changeset 82c08aa85754 in modules/product_cost_warehouse:6.0
details:
https://hg.tryton.org/modules/product_cost_warehouse?cmd=changeset&node=82c08aa85754
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 0eb0d4a4e677 -r 82c08aa85754 stock.py
--- a/stock.py Sat Oct 02 00:27:26 2021 +0200
+++ b/stock.py Mon Dec 06 23:38:58 2021 +0100
@@ -220,5 +220,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