From 95e20deb17bfb60817773e061e83c819f265266f Mon Sep 17 00:00:00 2001 From: Wilson Gomez Date: Fri, 12 May 2023 08:36:06 -0500 Subject: [PATCH] minr fix --- sale.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sale.py b/sale.py index 1258e5d..5b9a0a0 100644 --- a/sale.py +++ b/sale.py @@ -376,9 +376,12 @@ class Sale(metaclass=PoolMeta): if v.get('unit_price'): v['unit_price'] = Decimal(str(v['unit_price'])) + # else: + # v['unit_price'] = product.list_price + if v.get('unit_price') == 0: + pass else: - v['unit_price'] = product.list_price - v['base_price'] = product.list_price + v['base_price'] = product.list_price v['unit'] = product.template.default_uom.id v['description'] = product.name v['product'] = v['product']['id']