diff options
| author | Thibault Delavallée <tde@odoo.com> | 2017-02-15 13:09:05 +0100 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2017-02-27 10:00:46 +0100 |
| commit | 58a4bfd973f4bf2a33243511c498c2d9decf9a11 (patch) | |
| tree | e2898ab914e3a1f3cd2e40072aeb354e861b3e2a /addons/project_issue/models/project_issue.py | |
| parent | 3979a4f4c6147948434d562199930776b3df11c6 (diff) | |
[IMP] mail: update message_new to return the newly created record not just its id
Diffstat (limited to 'addons/project_issue/models/project_issue.py')
| -rw-r--r-- | addons/project_issue/models/project_issue.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/addons/project_issue/models/project_issue.py b/addons/project_issue/models/project_issue.py index d4f5e94209f..a141460110d 100644 --- a/addons/project_issue/models/project_issue.py +++ b/addons/project_issue/models/project_issue.py @@ -298,12 +298,11 @@ class ProjectIssue(models.Model): if custom_values: defaults.update(custom_values) - res_id = super(ProjectIssue, self.with_context(create_context)).message_new(msg, custom_values=defaults) - issue = self.browse(res_id) + issue = super(ProjectIssue, self.with_context(create_context)).message_new(msg, custom_values=defaults) email_list = issue.email_split(msg) partner_ids = filter(None, issue._find_partner_from_emails(email_list)) issue.message_subscribe(partner_ids) - return res_id + return issue @api.multi def message_update(self, msg, update_vals=None): |
