[IMP] stock: Use default dest location of picking types on return transfers
Purpose: When we create a return transfer, the return location should be selected as the default destination location of the "Picking type for return". Odoo should be using that return location as the default return location during reverse transfer, but only if the default destination location of the "Picking type for return" is a return location Specification: For all transfers, if the default destination location of the "Picking type for return" is a return location, then the return location should be selected as the default destination location during reverse transfer.
This commit is contained in:
committed by
Yannick Tivisse
parent
7306e888a6
commit
74936dbb64
@@ -67,7 +67,10 @@ class ReturnPicking(models.TransientModel):
|
||||
if 'original_location_id' in fields:
|
||||
res.update({'original_location_id': picking.location_id.id})
|
||||
if 'location_id' in fields:
|
||||
res.update({'location_id': picking.location_id.id})
|
||||
location_id = picking.location_id.id
|
||||
if picking.picking_type_id.return_picking_type_id.default_location_dest_id.return_location:
|
||||
location_id = picking.picking_type_id.return_picking_type_id.default_location_dest_id.id
|
||||
res['location_id'] = location_id
|
||||
return res
|
||||
|
||||
@api.multi
|
||||
|
||||
Reference in New Issue
Block a user