From e841aa6f72177ef1f66d4fe41eb62f0c602e6f02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 6 Dec 2021 23:38:58 +0100 Subject: [PATCH] Use shipment company to get shipment_internal_transit issue10992 review391211002 (grafted from b7a44148ecb1e603de81327d5ae5cafe31b0290c) --HG-- branch : 6.0 --- stock.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/stock.py b/stock.py index edaff3f7f3..ce4a0aa65f 100644 --- a/stock.py +++ b/stock.py @@ -220,5 +220,8 @@ class ShipmentInternal(metaclass=PoolMeta): Config = pool.get('stock.configuration') location = super().on_change_with_transit_location(name=name) if not location and self.company and self.company.cost_price_warehouse: - location = Config(1).get_multivalue('shipment_internal_transit').id + location = Config(1).get_multivalue( + 'shipment_internal_transit', company=self.company) + if location: + location = location.id return location