diff options
| -rwxr-xr-x | indoteknik_custom/models/purchase_pricelist.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/indoteknik_custom/models/purchase_pricelist.py b/indoteknik_custom/models/purchase_pricelist.py index c756c301..805ebc89 100755 --- a/indoteknik_custom/models/purchase_pricelist.py +++ b/indoteknik_custom/models/purchase_pricelist.py @@ -34,7 +34,11 @@ class PurchasePricelist(models.Model): @api.constrains('system_last_update','system_price','product_price','human_last_update','taxes_system_id','taxes_product_id') def _contrains_include_price(self): + price_unit, taxes = self._get_valid_price() + if price_unit == 0: + self.include_price = 0 + return # taxes = self.taxes_system_id or self.taxes_product_id # price_unit = self.system_price or self.product_price tax_include = taxes.price_include |
