changeset 55b0b2e54266 in modules/stock_consignment:default
details: 
https://hg.tryton.org/modules/stock_consignment?cmd=changeset&node=55b0b2e54266
description:
        Support empty list price on product

        issue10244
        review350341002
diffstat:

 stock.py |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (23 lines):

diff -r 365eef5f7c93 -r 55b0b2e54266 stock.py
--- a/stock.py  Sun Jul 04 17:54:48 2021 +0200
+++ b/stock.py  Mon Sep 13 23:29:57 2021 +0200
@@ -210,7 +210,8 @@
                 taxes=[t.id for t in line.taxes]):
             line.unit_price = Product.get_purchase_price(
                 [line.product], line.quantity)[line.product.id]
-            line.unit_price = round_price(line.unit_price)
+            if line.unit_price is not None:
+                line.unit_price = round_price(line.unit_price)
         return line
 
     def _get_customer_invoice_line_consignment(self):
@@ -254,7 +255,8 @@
                 taxes=[t.id for t in line.taxes]):
             line.unit_price = Product.get_sale_price(
                 [line.product], line.quantity)[line.product.id]
-            line.unit_price = round_price(line.unit_price)
+            if line.unit_price is not None:
+                line.unit_price = round_price(line.unit_price)
         return line
 
     @classmethod

Reply via email to