product_category_tax: add field in constraint
This commit is contained in:
@@ -48,7 +48,7 @@ class ProductTemplate(models.Model):
|
|||||||
_inherit = ['product.template', 'product.categ.tax.mixin']
|
_inherit = ['product.template', 'product.categ.tax.mixin']
|
||||||
_name = 'product.template'
|
_name = 'product.template'
|
||||||
|
|
||||||
@api.constrains('taxes_id', 'supplier_taxes_id')
|
@api.constrains('taxes_id', 'supplier_taxes_id', 'categ_id')
|
||||||
def _check_tax_categ(self):
|
def _check_tax_categ(self):
|
||||||
# self.name != 'Pay Debt' is a stupid hack to avoid blocking the
|
# self.name != 'Pay Debt' is a stupid hack to avoid blocking the
|
||||||
# installation of the module 'pos_debt_notebook'
|
# installation of the module 'pos_debt_notebook'
|
||||||
|
|||||||
Reference in New Issue
Block a user