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']