[FIX] stock: destination location on delivery order without partner
If you create a delivery order without partner, its destination location zone will be set to "Partner Locations / Vendors", which is not correct. This is due to an error in the onchange_picking_type. This commit fixes the issue by setting the destination location to "Partner Locations / Customers". This change has not other implications more than being consistent.
This commit is contained in:
committed by
Simon Lejeune
parent
8fe8ca9948
commit
3f375c9bbe
@@ -374,7 +374,7 @@ class Picking(models.Model):
|
||||
elif self.partner_id:
|
||||
location_dest_id = self.partner_id.property_stock_customer.id
|
||||
else:
|
||||
customerloc, location_dest_id = self.env['stock.warehouse']._get_partner_locations()
|
||||
location_dest_id, supplierloc = self.env['stock.warehouse']._get_partner_locations()
|
||||
|
||||
self.location_id = location_id
|
||||
self.location_dest_id = location_dest_id
|
||||
|
||||
Reference in New Issue
Block a user