diff --git a/mail_reply_to_sender/__init__.py b/mail_reply_to_sender/__init__.py new file mode 100644 index 000000000..cde864bae --- /dev/null +++ b/mail_reply_to_sender/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +from . import models diff --git a/mail_reply_to_sender/__manifest__.py b/mail_reply_to_sender/__manifest__.py new file mode 100644 index 000000000..6c98f924f --- /dev/null +++ b/mail_reply_to_sender/__manifest__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +# This file is part of OpenERP. The COPYRIGHT file at the top level of +# this module contains the full copyright notices and license terms. +{ + 'name': 'Mail Reply To sender/reply to field(mail template)', + 'version': '1.0', + 'author': 'PPTS [India] Pvt.Ltd.', + 'website': 'https://www.pptssolutions.com', + 'license': 'LGPL-3', + 'category': 'Mail', + 'support': 'business@pptservices.com', + 'summary': 'Mail Reply to the sender', + 'description': """ This module provides a functionality to reply to sender's email address or the mail address given in 'Reply To' field of email template""", + 'depends': [ + 'mail', + ], + 'data': [ + ], + 'installable': True, + 'application': False, + 'images': ['static/description/banner.png'], +} diff --git a/mail_reply_to_sender/models/__init__.py b/mail_reply_to_sender/models/__init__.py new file mode 100644 index 000000000..f024d4e21 --- /dev/null +++ b/mail_reply_to_sender/models/__init__.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -*- +from . import ir_mail_server diff --git a/mail_reply_to_sender/models/ir_mail_server.py b/mail_reply_to_sender/models/ir_mail_server.py new file mode 100644 index 000000000..2070d7c37 --- /dev/null +++ b/mail_reply_to_sender/models/ir_mail_server.py @@ -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 diff --git a/mail_reply_to_sender/static/description/banner.png b/mail_reply_to_sender/static/description/banner.png new file mode 100644 index 000000000..c64571c86 Binary files /dev/null and b/mail_reply_to_sender/static/description/banner.png differ diff --git a/mail_reply_to_sender/static/description/icon.png b/mail_reply_to_sender/static/description/icon.png new file mode 100755 index 000000000..0c90ea3f2 Binary files /dev/null and b/mail_reply_to_sender/static/description/icon.png differ diff --git a/mail_reply_to_sender/static/description/index.html b/mail_reply_to_sender/static/description/index.html new file mode 100644 index 000000000..701914048 --- /dev/null +++ b/mail_reply_to_sender/static/description/index.html @@ -0,0 +1,44 @@ +
+
+

Mail Reply to sender/reply to(Email template field)

+

+ This module provides a functionality to reply to sender's email address or the mail address given in 'Reply To' field of email template. This will replace default catchall@domain.com +

+
+
+ + +
+
+
+

+ Step: +

+

+ Go to the Email templates and add any email address(or use placeholder) in reply to field. If the sender address and reply to address are same reply will be sent to the sender. + If the sender address and reply to is different reply will be sent to reply to address. +

+ +
+ +
+
+
+ +
+

Need Any Help?

+
+ Email Contact Us +
+ +

+ PPTS [India] Pvt.Ltd. +

+
+
+
\ No newline at end of file diff --git a/mail_reply_to_sender/static/description/mail_reply_to_1.png b/mail_reply_to_sender/static/description/mail_reply_to_1.png new file mode 100644 index 000000000..8688df415 Binary files /dev/null and b/mail_reply_to_sender/static/description/mail_reply_to_1.png differ diff --git a/mail_reply_to_sender/static/description/mail_reply_to_2.png b/mail_reply_to_sender/static/description/mail_reply_to_2.png new file mode 100644 index 000000000..7a3c7c6fd Binary files /dev/null and b/mail_reply_to_sender/static/description/mail_reply_to_2.png differ diff --git a/mail_reply_to_sender/static/description/reply_to.png b/mail_reply_to_sender/static/description/reply_to.png new file mode 100644 index 000000000..e51166bef Binary files /dev/null and b/mail_reply_to_sender/static/description/reply_to.png differ