mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
Reply to sender
This commit is contained in:
2
mail_reply_to_sender/models/__init__.py
Normal file
2
mail_reply_to_sender/models/__init__.py
Normal file
@@ -0,0 +1,2 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from . import ir_mail_server
|
||||
17
mail_reply_to_sender/models/ir_mail_server.py
Normal file
17
mail_reply_to_sender/models/ir_mail_server.py
Normal 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
|
||||
Reference in New Issue
Block a user