From 5301caa30d24c32445164e7497ed9c8bd528b9cd Mon Sep 17 00:00:00 2001 From: gabrielmoralessaez Date: Thu, 11 Apr 2024 13:59:20 -0400 Subject: [PATCH] [FIX] t4934 prohibir rut duplicado excepto 66666666-6 --- partner_vat_unique/i18n/es.po | 2 +- partner_vat_unique/models/res_partner.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/partner_vat_unique/i18n/es.po b/partner_vat_unique/i18n/es.po index ce85a5715d5..2702bab0411 100644 --- a/partner_vat_unique/i18n/es.po +++ b/partner_vat_unique/i18n/es.po @@ -45,7 +45,7 @@ msgstr "" #: code:addons/partner_vat_unique/models/res_partner.py:0 #, python-format msgid "The VAT %s already exists in another partner." -msgstr "El NIF %s debe de ser Ășnico por empresa." +msgstr "El Rut %s debe de ser Ășnico por empresa." #~ msgid "" #~ "The Tax Identification Number. Complete it if the contact is subjected to " diff --git a/partner_vat_unique/models/res_partner.py b/partner_vat_unique/models/res_partner.py index 168019bc16a..89235b58fcf 100644 --- a/partner_vat_unique/models/res_partner.py +++ b/partner_vat_unique/models/res_partner.py @@ -20,9 +20,12 @@ def _check_vat_unique(self): test_condition = config["test_enable"] and not self.env.context.get( "test_vat" ) + rut= '66666666-6' + if record.vat == rut: + test_condition =True if test_condition: continue if record.same_vat_partner_id: raise ValidationError( _("The VAT %s already exists in another partner.") % record.vat - ) + )