File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -67,6 +67,12 @@ msgstr "Impuesto AFIP"
6767msgid "According to partner VAT responsibility"
6868msgstr "De acuerdo a la responsabilidad de IVA"
6969
70+ #. module: l10n_ar_ux
71+ #: code:addons/l10n_ar_ux/models/res_country.py:0
72+ #, python-format
73+ msgid "Argentina country code must always be 'AR'."
74+ msgstr "El código del país Argentina debe ser siempre 'AR'."
75+
7076#. module: l10n_ar_ux
7177#: model:ir.model,name: l10n_ar_ux.model_account_account
7278msgid "Account"
Original file line number Diff line number Diff line change 1313from . import ir_actions_report
1414from . import account_journal
1515from . import account_account
16+ from . import res_country
Original file line number Diff line number Diff line change 1+ from odoo import _ , api , models
2+ from odoo .exceptions import ValidationError
3+
4+
5+ class ResCountry (models .Model ):
6+ _inherit = "res.country"
7+
8+ @api .constrains ("code" )
9+ def _check_argentina_code (self ):
10+ argentina = self .env .ref ("base.ar" , raise_if_not_found = False )
11+ for record in self :
12+ if argentina and record .id == argentina .id and record .code != "AR" :
13+ raise ValidationError (_ ("Argentina country code must always be 'AR'." ))
You can’t perform that action at this time.
0 commit comments