diff --git a/addons/mail/models/mail_thread.py b/addons/mail/models/mail_thread.py index 96d99fb85b5..4ec3af5159e 100644 --- a/addons/mail/models/mail_thread.py +++ b/addons/mail/models/mail_thread.py @@ -332,14 +332,14 @@ class MailThread(models.AbstractModel): if nothing_here: return "
%(dyn_help)s
%(static_help)s" % { 'static_help': help or '', - 'dyn_help': _("Add new %(document)s or send an email to: %(email_link)s") % { + 'dyn_help': _("Add new %(document)s or send an email to %(email_link)s") % { 'document': document_name, 'email_link': email_link } } return "%(static_help)s%(dyn_help)s
" % { 'static_help': help or '', - 'dyn_help': _("You could also add a new %(document)s by sending an email to: %(email_link)s") % { + 'dyn_help': _("Create a new %(document)s by sending an email to %(email_link)s") % { 'document': document_name, 'email_link': email_link, } diff --git a/addons/project/models/project.py b/addons/project/models/project.py index 02eefc332fa..45be62433b7 100644 --- a/addons/project/models/project.py +++ b/addons/project/models/project.py @@ -682,10 +682,16 @@ class Task(models.Model): @api.model def get_empty_list_help(self, help): + tname = _("task") + project_id = self.env.context.get('default_project_id', False) + if project_id: + name = self.env['project.project'].browse(project_id).label_tasks + if name: tname = name.lower() + self = self.with_context( empty_list_help_id=self.env.context.get('default_project_id'), empty_list_help_model='project.project', - empty_list_help_document_name=_("task"), + empty_list_help_document_name=tname, ) return super(Task, self).get_empty_list_help(help)