changeset cef7d2a6caff in modules/stock_consignment:default
details:
https://hg.tryton.org/modules/stock_consignment?cmd=changeset;node=cef7d2a6caff
description:
Use product_suppliers_used to find supplier on template
issue10129
review332171005
diffstat:
stock.py | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diffs (17 lines):
diff -r 045ea2c66f13 -r cef7d2a6caff stock.py
--- a/stock.py Sat Dec 19 17:08:47 2020 +0100
+++ b/stock.py Thu Mar 11 19:15:20 2021 +0100
@@ -168,10 +168,9 @@
with Transaction().set_context(
supplier=self.from_location.consignment_party.id):
pattern = ProductSupplier.get_pattern()
- for product_supplier in self.product.product_suppliers:
- if product_supplier.match(pattern):
- currency = product_supplier.currency
- break
+ for product_supplier in self.product.product_suppliers_used(**pattern):
+ currency = product_supplier.currency
+ break
else:
currency = self.company.currency