From 444786c971a72eeed3085a0394c8751eb07006d0 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Wed, 29 Jul 2015 13:33:11 +0200 Subject: [PATCH] Horrible hack to avoid blocking the installion of the module pos_debt_notebook --- product_category_tax/product.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/product_category_tax/product.py b/product_category_tax/product.py index 1fa8b56..141f29e 100644 --- a/product_category_tax/product.py +++ b/product_category_tax/product.py @@ -41,7 +41,9 @@ class ProductTemplate(models.Model): @api.one @api.constrains('taxes_id', 'supplier_taxes_id') def _check_tax_categ(self): - if self.categ_id: + # self.name != 'Pay Debt' is a stupid hack to avoid blocking the + # installation of the module 'pos_debt_notebook' + if self.categ_id and self.name != 'Pay Debt': if self.categ_id.sale_tax_ids.ids != self.taxes_id.ids: raise ValidationError( _("The sale taxes configured on the product '%s' "