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/base_sparse_field | |
| 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/base_sparse_field')
| -rw-r--r-- | addons/base_sparse_field/models/models.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/base_sparse_field/models/models.py b/addons/base_sparse_field/models/models.py index 1991306a631..179f6fbdc36 100644 --- a/addons/base_sparse_field/models/models.py +++ b/addons/base_sparse_field/models/models.py @@ -32,9 +32,9 @@ class IrModelFields(models.Model): if 'serialization_field_id' in vals or 'name' in vals: for field in self: if 'serialization_field_id' in vals and field.serialization_field_id.id != vals['serialization_field_id']: - raise UserError(_('Changing the storing system for field "%s" is not allowed.') % field.name) + raise UserError(_('Changing the storing system for field "%s" is not allowed.', field.name)) if field.serialization_field_id and (field.name != vals['name']): - raise UserError(_('Renaming sparse field "%s" is not allowed') % field.name) + raise UserError(_('Renaming sparse field "%s" is not allowed', field.name)) return super(IrModelFields, self).write(vals) |
