diff options
| author | Martin Trigaux <mat@odoo.com> | 2020-06-15 15:16:16 +0200 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2020-06-18 13:03:34 +0200 |
| commit | 80e97e98ce76067db1079af8feeef667cfadf837 (patch) | |
| tree | e261d34e3f8458bd99011f60f508bcce2c723baf /addons/account/models/account_account.py | |
| parent | 4a92a183e8631512a8b018eedaf9bf4956ca85e9 (diff) | |
[IMP] *: use named placeholders in translated message
When more than one parameter is present in a message, it helps the
translation to use named placeholder. This way, the order can be
changed. It also helps the comprehension of the message.
Diffstat (limited to 'addons/account/models/account_account.py')
| -rw-r--r-- | addons/account/models/account_account.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/addons/account/models/account_account.py b/addons/account/models/account_account.py index 980e58a8ef7..1622338baf2 100644 --- a/addons/account/models/account_account.py +++ b/addons/account/models/account_account.py @@ -147,7 +147,11 @@ class AccountAccount(models.Model): if res: account = self.env['account.account'].browse(res[0]) journal = self.env['account.journal'].browse(res[1]) - raise ValidationError(_("The foreign currency set on the journal '%s' and the account '%s' must be the same.") % (journal.display_name, account.display_name)) + raise ValidationError(_( + "The foreign currency set on the journal '%(journal)s' and the account '%(account)s' must be the same.", + journal=journal.display_name, + account=account.display_name + )) @api.constrains('company_id') def _check_company_consistency(self): |
