Reply to sender

This commit is contained in:
Jose Luis
2020-01-03 12:30:43 +01:00
parent d8381e8fd7
commit 8fce730435
10 changed files with 88 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
# -*- coding: utf-8 -*-
from . import ir_mail_server

View File

@@ -0,0 +1,17 @@
# -*- coding: utf-8 -*-
from odoo import models,api
class MailComposer(models.TransientModel):
_inherit = 'mail.compose.message'
@api.multi
def get_mail_values(self, res_ids):
res = super(MailComposer, self).get_mail_values(res_ids)
if self.composition_mode == 'comment':
mail_reply_to = getattr(self, 'reply_to', None)
if mail_reply_to:
for f, x in res.items():
if 'reply_to' not in x:
x['reply_to'] = mail_reply_to
return res