mirror of
https://github.com/NaN-tic/trytond-stock_location_warehouse.git
synced 2023-12-14 06:43:04 +01:00
On warehouse searcher, consider the case when location's warehouse is None.
(grafted from 54b6bda0aba6fd5e6a98318eb590114aaffbd2c2)
This commit is contained in:
parent
f33f5e9440
commit
631eabc1a7
|
@ -81,6 +81,7 @@ class Location(ModelSQL, ModelView):
|
|||
for location in cls.search([
|
||||
('parent', 'child_of', storage_location_ids),
|
||||
]):
|
||||
if location.warehouse.id in found_warehouse_ids:
|
||||
if (location.warehouse
|
||||
and location.warehouse.id in found_warehouse_ids):
|
||||
warehouse_location_ids.append(location.id)
|
||||
return [('id', 'in', warehouse_location_ids)]
|
||||
|
|
Loading…
Reference in a new issue