Better selection of picking type
This commit is contained in:
@@ -277,12 +277,16 @@ class PurchaseSuggestPoCreate(models.TransientModel):
|
|||||||
('warehouse_id.company_id', '=', company.id)]
|
('warehouse_id.company_id', '=', company.id)]
|
||||||
pick_types = spto.search(
|
pick_types = spto.search(
|
||||||
pick_type_dom + [(
|
pick_type_dom + [(
|
||||||
'default_location_dest_id',
|
'default_location_dest_id', 'child_of', location.id)])
|
||||||
'child_of',
|
|
||||||
location.location_id.id)])
|
|
||||||
# I use location.parent_id.id to support 2 step-receptions
|
# I use location.parent_id.id to support 2 step-receptions
|
||||||
# where the stock.location .type is linked to Warehouse > Receipt
|
# where the stock.location .type is linked to Warehouse > Receipt
|
||||||
# but location is Warehouse > Stock
|
# but location is Warehouse > Stock
|
||||||
|
if not pick_types:
|
||||||
|
pick_types = spto.search(
|
||||||
|
pick_type_dom + [(
|
||||||
|
'default_location_dest_id',
|
||||||
|
'child_of',
|
||||||
|
location.location_id.id)])
|
||||||
if not pick_types:
|
if not pick_types:
|
||||||
pick_types = spto.search(pick_type_dom)
|
pick_types = spto.search(pick_type_dom)
|
||||||
if not pick_types:
|
if not pick_types:
|
||||||
|
|||||||
Reference in New Issue
Block a user