product_category_tax: add field in constraint

This commit is contained in:
Alexis de Lattre
2023-02-13 22:03:05 +01:00
parent 00df54ee37
commit 0358127f0c

View File

@@ -50,7 +50,7 @@ class ProductTemplate(models.Model):
_name = 'product.template'
@api.one
@api.constrains('taxes_id', 'supplier_taxes_id')
@api.constrains('taxes_id', 'supplier_taxes_id', 'categ_id')
def _check_tax_categ(self):
# self.name != 'Pay Debt' is a stupid hack to avoid blocking the
# installation of the module 'pos_debt_notebook'