summaryrefslogtreecommitdiff
path: root/addons/l10n_it_edi
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_it_edi
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_it_edi')
-rw-r--r--addons/l10n_it_edi/models/account_edi_format.py4
-rw-r--r--addons/l10n_it_edi/models/account_invoice.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/addons/l10n_it_edi/models/account_edi_format.py b/addons/l10n_it_edi/models/account_edi_format.py
index ab2d7230407..6d52e5cf08e 100644
--- a/addons/l10n_it_edi/models/account_edi_format.py
+++ b/addons/l10n_it_edi/models/account_edi_format.py
@@ -83,13 +83,13 @@ class AccountEdiFormat(models.Model):
else:
company = self.env.company
if elements:
- _logger.info(_('Company not found with codice fiscale: %s. The company\'s user is set by default.') % elements[0].text)
+ _logger.info(_('Company not found with codice fiscale: %s. The company\'s user is set by default.', elements[0].text))
else:
_logger.info(_('Company not found. The company\'s user is set by default.'))
if not self.env.is_superuser():
if self.env.company != company:
- raise UserError(_("You can only import invoice concern your current company: %s") % self.env.company.display_name)
+ raise UserError(_("You can only import invoice concern your current company: %s", self.env.company.display_name))
# Refund type.
# TD01 == invoice
diff --git a/addons/l10n_it_edi/models/account_invoice.py b/addons/l10n_it_edi/models/account_invoice.py
index 62e40420247..3e7c910e7b0 100644
--- a/addons/l10n_it_edi/models/account_invoice.py
+++ b/addons/l10n_it_edi/models/account_invoice.py
@@ -168,7 +168,7 @@ class AccountMove(models.Model):
}
data = b"<?xml version='1.0' encoding='UTF-8'?>" + invoice._export_as_xml()
- description = _('Italian invoice: %s') % invoice.move_type
+ description = _('Italian invoice: %s', invoice.move_type)
invoice.edi_document_ids = self.env['ir.attachment'].create({
'name': report_name,
'res_id': invoice.id,