diff --git a/partner_vat_unique/__manifest__.py b/partner_vat_unique/__manifest__.py index f89bfe93f..959193b98 100644 --- a/partner_vat_unique/__manifest__.py +++ b/partner_vat_unique/__manifest__.py @@ -4,7 +4,7 @@ "name": "Partner VAT Unique", "summary": "Module to make the VAT number unique for customers and suppliers.", - "version": "12.0.1.0.2", + "version": "12.0.1.0.3", "category": "Customer Relationship Management", "website": "https://github.com/OCA/partner-contact", "author": "Grant Thornton S.L.P, Odoo Community Association (OCA)", diff --git a/partner_vat_unique/models/res_partner.py b/partner_vat_unique/models/res_partner.py index 7fee5340a..3437f6fae 100644 --- a/partner_vat_unique/models/res_partner.py +++ b/partner_vat_unique/models/res_partner.py @@ -12,7 +12,7 @@ class ResPartner(models.Model): vat = fields.Char(copy=False) - @api.constrains('vat') + @api.constrains('vat', 'company_id') def _check_vat_unique(self): for record in self: if record.parent_id or not record.vat: