diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index 3fae85f311d..6e484506223 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -966,6 +966,11 @@ class crm_lead(base_stage, format_address, osv.osv): # Mail Gateway # ---------------------------------------- + def message_get_reply_to(self, cr, uid, ids, context=None): + """ Override to get the reply_to of the parent project. """ + return [lead.section_id.message_get_reply_to()[0] if lead.section_id else False + for lead in self.browse(cr, uid, ids, context=context)] + def message_new(self, cr, uid, msg, custom_values=None, context=None): """ Overrides mail_thread message_new that is called by the mailgateway through message_process. diff --git a/addons/project/project.py b/addons/project/project.py index e98254d2fa1..40fb6bb4efd 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -1166,6 +1166,11 @@ class task(base_stage, osv.osv): # Mail gateway # --------------------------------------------------- + def message_get_reply_to(self, cr, uid, ids, context=None): + """ Override to get the reply_to of the parent project. """ + return [task.project_id.message_get_reply_to()[0] if task.project_id else False + for task in self.browse(cr, uid, ids, context=context)] + def message_new(self, cr, uid, msg, custom_values=None, context=None): """ Override to updates the document according to the email. """ if custom_values is None: custom_values = {} diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py index 8b2afb130e1..5a757fdac39 100644 --- a/addons/project_issue/project_issue.py +++ b/addons/project_issue/project_issue.py @@ -481,6 +481,11 @@ class project_issue(base_stage, osv.osv): # Mail gateway # ------------------------------------------------------- + def message_get_reply_to(self, cr, uid, ids, context=None): + """ Override to get the reply_to of the parent project. """ + return [issue.project_id.message_get_reply_to()[0] if issue.project_id else False + for issue in self.browse(cr, uid, ids, context=context)] + def message_new(self, cr, uid, msg, custom_values=None, context=None): """ Overrides mail_thread message_new that is called by the mailgateway through message_process.