changeset a234530aa37b in modules/product_cost_warehouse:6.2
details:
https://hg.tryton.org/modules/product_cost_warehouse?cmd=changeset&node=a234530aa37b
description:
Use shipment company to get shipment_internal_transit
issue10992
review391211002
(grafted from b7a44148ecb1e603de81327d5ae5cafe31b0290c)
diffstat:
stock.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diffs (13 lines):
diff -r 4ed3044c0435 -r a234530aa37b stock.py
--- a/stock.py Mon Nov 01 17:20:46 2021 +0100
+++ b/stock.py Mon Dec 06 23:38:58 2021 +0100
@@ -214,5 +214,8 @@
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