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/phone_validation/models/mail_thread_phone.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/phone_validation/models/mail_thread_phone.py')
| -rw-r--r-- | addons/phone_validation/models/mail_thread_phone.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/phone_validation/models/mail_thread_phone.py b/addons/phone_validation/models/mail_thread_phone.py index 9b608c8b601..d560de1911a 100644 --- a/addons/phone_validation/models/mail_thread_phone.py +++ b/addons/phone_validation/models/mail_thread_phone.py @@ -106,9 +106,9 @@ class PhoneMixin(models.AbstractModel): def _assert_phone_field(self): if not hasattr(self, "_phone_get_number_fields"): - raise UserError(_('Invalid primary phone field on model %s') % self._name) + raise UserError(_('Invalid primary phone field on model %s', self._name)) if not any(fname in self and self._fields[fname].type == 'char' for fname in self._phone_get_number_fields()): - raise UserError(_('Invalid primary phone field on model %s') % self._name) + raise UserError(_('Invalid primary phone field on model %s', self._name)) def _phone_get_number_fields(self): """ This method returns the fields to use to find the number to use to |
