diff options
| author | Martin Trigaux <mat@odoo.com> | 2020-06-04 12:39:11 +0200 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2020-06-18 13:03:34 +0200 |
| commit | ba244cef01132347df4d2d9553ea3105ba13a938 (patch) | |
| tree | 20cdb55afb6b9f700bfe2844a90ca8de0050c941 /addons/mass_mailing/models/mailing.py | |
| parent | 3c3b88f6768e31417263b3828a874ca204e29514 (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/mass_mailing/models/mailing.py')
| -rw-r--r-- | addons/mass_mailing/models/mailing.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/mass_mailing/models/mailing.py b/addons/mass_mailing/models/mailing.py index 31c2acc8dc3..7146c1cc77d 100644 --- a/addons/mass_mailing/models/mailing.py +++ b/addons/mass_mailing/models/mailing.py @@ -259,7 +259,7 @@ class MassMailing(models.Model): def copy(self, default=None): self.ensure_one() default = dict(default or {}, - name=_('%s (copy)') % self.name, + name=_('%s (copy)', self.name), contact_list_ids=self.contact_list_ids.ids) return super(MassMailing, self).copy(default=default) @@ -469,7 +469,7 @@ class MassMailing(models.Model): elif 'email' in target._fields: mail_field = 'email' else: - raise UserError(_("Unsupported mass mailing model %s") % self.mailing_model_id.name) + raise UserError(_("Unsupported mass mailing model %s", self.mailing_model_id.name)) if self.unique_ab_testing: query +=""" |
