[IMP] crm, project, project_issue: reply_to address is now the alias of the parent section, project, project, if any.
bzr revid: tde@openerp.com-20130103170316-8n6d8u0h14dy4x48
This commit is contained in:
parent
4899a0df02
commit
8da57cbd2e
|
@ -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.
|
||||
|
|
|
@ -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 = {}
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue