summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/purchase_pricelist.py
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2024-01-29 14:26:39 +0700
committerstephanchrst <stephanchrst@gmail.com>2024-01-29 14:26:39 +0700
commit3877bf37dae2db272b869f829ed52ef77689cc5d (patch)
tree46523b9c4306b5457924420f53e832da1c296224 /indoteknik_custom/models/purchase_pricelist.py
parent4a35b0d5432ed38395fa8f8cb6ebcfb5e0887f28 (diff)
parentd62a28e8760c86e2c0a6cb7469f626d9447272be (diff)
Merge branch 'production' of https://bitbucket.org/altafixco/indoteknik-addons into production
Diffstat (limited to 'indoteknik_custom/models/purchase_pricelist.py')
-rwxr-xr-xindoteknik_custom/models/purchase_pricelist.py4
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