From 3f375c9bbe2ea487f89d6f35aa6ed8e6c9fe87a2 Mon Sep 17 00:00:00 2001 From: Josse Colpaert Date: Wed, 14 Dec 2016 13:47:54 +0100 Subject: [PATCH] [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. --- addons/stock/models/stock_picking.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/models/stock_picking.py b/addons/stock/models/stock_picking.py index 20b261aa7f2..f71c072de33 100644 --- a/addons/stock/models/stock_picking.py +++ b/addons/stock/models/stock_picking.py @@ -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