Use shipment company to get shipment_internal_transit

issue10992
review391211002
This commit is contained in:
Cédric Krier committed 2021-12-06 23:38:58 +01:00
1 parent a0fbfd6a67
commit 4666d76502
1 file changed
+4 -1
+4 -1
View File
@@ -214,5 +214,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