changeset 32c42e2dc2fe in modules/web_shop:default
details: https://hg.tryton.org/modules/web_shop?cmd=changeset&node=32c42e2dc2fe
description:
Support empty list price on product
issue10244
review350341002
diffstat:
web.py | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (19 lines):
diff -r c2a3b56051c0 -r 32c42e2dc2fe web.py
--- a/web.py Sun Aug 29 17:49:40 2021 +0200
+++ b/web.py Mon Sep 13 23:29:57 2021 +0200
@@ -215,9 +215,12 @@
with Transaction().set_context(taxes=tax_ids):
prices.update(Product.get_sale_price(products))
for product in products:
- taxes[product.id] = sum(
- t['amount']
- for t in Tax.compute(taxes_, prices[product.id], 1))
+ price = prices[product.id]
+ if price is not None:
+ taxes[product.id] = sum(
+ t['amount'] for t in Tax.compute(taxes_, price, 1))
+ else:
+ taxes[product.id] = None
return all_products, prices, taxes