summaryrefslogtreecommitdiff
path: root/addons/project/models
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/project/models
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/project/models')
-rw-r--r--addons/project/models/project.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/project/models/project.py b/addons/project/models/project.py
index 70c5f58f4dc..dee727dfcfb 100644
--- a/addons/project/models/project.py
+++ b/addons/project/models/project.py
@@ -639,7 +639,7 @@ class Task(models.Model):
portal_users = task.allowed_user_ids.filtered('share')
if portal_users:
user_names = ', '.join(portal_users[:10].mapped('name'))
- raise ValidationError(_("The project visibility setting doesn't allow portal users to see the project's tasks. (%s)") % user_names)
+ raise ValidationError(_("The project visibility setting doesn't allow portal users to see the project's tasks. (%s)", user_names))
def _compute_attachment_ids(self):
for task in self:
@@ -752,7 +752,7 @@ class Task(models.Model):
if default is None:
default = {}
if not default.get('name'):
- default['name'] = _("%s (copy)") % self.name
+ default['name'] = _("%s (copy)", self.name)
return super(Task, self).copy(default)
@api.constrains('parent_id')