Skip to content

Commit

Permalink
[FIX] t4934 prohibir rut duplicado excepto 66666666-6
Browse files Browse the repository at this point in the history
  • Loading branch information
gam-bmya committed Apr 11, 2024
1 parent 4b3605c commit 5301caa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion partner_vat_unique/i18n/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
Expand Down
5 changes: 4 additions & 1 deletion partner_vat_unique/models/res_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
)

0 comments on commit 5301caa

Please sign in to comment.