changeset 94ba77090407 in modules/purchase_shipment_cost:default
details:
https://hg.tryton.org/modules/purchase_shipment_cost?cmd=changeset&node=94ba77090407
description:
Support empty list price on product
issue10244
review350341002
diffstat:
stock.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (15 lines):
diff -r 8fd1f8c7bc8d -r 94ba77090407 stock.py
--- a/stock.py Sun Jul 04 17:54:47 2021 +0200
+++ b/stock.py Mon Sep 13 23:29:56 2021 +0200
@@ -68,8 +68,9 @@
if self.carrier:
with Transaction().set_context(self._get_carrier_context()):
cost, currency_id = self.carrier.get_purchase_price()
- costs['cost'] = round_price(cost)
- costs['cost_currency'] = currency_id
+ if cost is not None:
+ costs['cost'] = round_price(cost)
+ costs['cost_currency'] = currency_id
return costs
@fields.depends(