[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:
Josse Colpaert
2016-12-15 15:03:46 +01:00
committed by Simon Lejeune
parent 8fe8ca9948
commit 3f375c9bbe
+1 -1
View File
@@ -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