diff options
| author | Dikshit Prajapati <pdi@openerp.com> | 2014-07-15 11:18:00 +0530 |
|---|---|---|
| committer | Thibault Delavallée <tde@openerp.com> | 2014-08-04 14:44:42 +0200 |
| commit | 2aed2108fa60b00a1de527a4080889496c97ec4d (patch) | |
| tree | f4627b9141068fb9230347a6f764f569a19da7d0 /addons/project/project.py | |
| parent | ff4b31140791ad5e296dea3006d8b8f70c77edac (diff) | |
[IMP] project : mailgateway: add to and cc as followers of the newly created task
Diffstat (limited to 'addons/project/project.py')
| -rw-r--r-- | addons/project/project.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/addons/project/project.py b/addons/project/project.py index 870923304c1..b56a6a3b3fe 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -1101,7 +1101,14 @@ class task(osv.osv): 'planned_hours': 0.0, } defaults.update(custom_values) - return super(task, self).message_new(cr, uid, msg, custom_values=defaults, context=context) + res = super(task, self).message_new(cr, uid, msg, custom_values=defaults, context=context) + email_list = tools.email_split(msg.get('to', '') + ',' + msg.get('cc', '')) + new_task = self.browse(cr, uid, res, context=context) + if new_task.project_id and new_task.project_id.alias_name: # check left-part is not already an alias + email_list = filter(lambda x: x.split('@')[0] != new_task.project_id.alias_name, email_list) + partner_ids = filter(lambda x: x, self._find_partner_from_emails(cr, uid, None, email_list, context=context, check_followers=False)) + self.message_subscribe(cr, uid, [res], partner_ids, context=context) + return res def message_update(self, cr, uid, ids, msg, update_vals=None, context=None): """ Override to update the task according to the email. """ |
