summaryrefslogtreecommitdiff
path: root/addons/l10n_ar/models
diff options
context:
space:
mode:
authorMartin Trigaux <mat@odoo.com>2020-06-04 12:39:11 +0200
committerMartin Trigaux <mat@odoo.com>2020-06-18 13:03:34 +0200
commitba244cef01132347df4d2d9553ea3105ba13a938 (patch)
tree20cdb55afb6b9f700bfe2844a90ca8de0050c941 /addons/l10n_ar/models
parent3c3b88f6768e31417263b3828a874ca204e29514 (diff)
[IMP] *: replace to new _() syntax
Using a few regex like \((_\(.*%s.*)(\) % )([\w\[\]][\w .\[\]\(\)'"]*)\) ($1, $3)) Old syntax is still compatible but starts the migration to the new syntax that catches error.
Diffstat (limited to 'addons/l10n_ar/models')
-rw-r--r--addons/l10n_ar/models/account_move.py2
-rw-r--r--addons/l10n_ar/models/res_partner.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/addons/l10n_ar/models/account_move.py b/addons/l10n_ar/models/account_move.py
index 178f5644f34..5184de1cb8d 100644
--- a/addons/l10n_ar/models/account_move.py
+++ b/addons/l10n_ar/models/account_move.py
@@ -98,7 +98,7 @@ class AccountMove(models.Model):
for line in inv.mapped('invoice_line_ids').filtered(lambda x: x.display_type not in ('line_section', 'line_note')):
vat_taxes = line.tax_ids.filtered(lambda x: x.tax_group_id.l10n_ar_vat_afip_code)
if len(vat_taxes) != 1:
- raise UserError(_('There must be one and only one VAT tax per line. Check line "%s"') % line.name)
+ raise UserError(_('There must be one and only one VAT tax per line. Check line "%s"', line.name))
elif purchase_aliquots == 'zero' and vat_taxes.tax_group_id.l10n_ar_vat_afip_code != '0':
raise UserError(_('On invoice id "%s" you must use VAT Not Applicable on every line.') % inv.id)
elif purchase_aliquots == 'not_zero' and vat_taxes.tax_group_id.l10n_ar_vat_afip_code == '0':
diff --git a/addons/l10n_ar/models/res_partner.py b/addons/l10n_ar/models/res_partner.py
index 50adb05dc1f..68bb218730b 100644
--- a/addons/l10n_ar/models/res_partner.py
+++ b/addons/l10n_ar/models/res_partner.py
@@ -103,10 +103,10 @@ class ResPartner(models.Model):
try:
module.validate(rec.vat)
except module.InvalidChecksum:
- raise ValidationError(_('The validation digit is not valid for "%s"') % rec.l10n_latam_identification_type_id.name)
+ raise ValidationError(_('The validation digit is not valid for "%s"', rec.l10n_latam_identification_type_id.name))
except module.InvalidLength:
- raise ValidationError(_('Invalid length for "%s"') % rec.l10n_latam_identification_type_id.name)
+ raise ValidationError(_('Invalid length for "%s"', rec.l10n_latam_identification_type_id.name))
except module.InvalidFormat:
- raise ValidationError(_('Only numbers allowed for "%s"') % rec.l10n_latam_identification_type_id.name)
+ raise ValidationError(_('Only numbers allowed for "%s"', rec.l10n_latam_identification_type_id.name))
except Exception as error:
raise ValidationError(repr(error))