From d41086e21010188f7a842607e4f855408472c798 Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Mon, 20 Jan 2014 14:00:07 +0600 Subject: [PATCH 01/22] upload --- __init__.py | 1 + __openerp__.py | 36 ++++++++++++++++++++++++++++++++++++ mail_fix_553.py | 25 +++++++++++++++++++++++++ 3 files changed, 62 insertions(+) create mode 100644 __init__.py create mode 100644 __openerp__.py create mode 100644 mail_fix_553.py diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..c978833 --- /dev/null +++ b/__init__.py @@ -0,0 +1 @@ +import mail_fix_553 diff --git a/__openerp__.py b/__openerp__.py new file mode 100644 index 0000000..7a9d6af --- /dev/null +++ b/__openerp__.py @@ -0,0 +1,36 @@ +{ + "name" : "Fix error 553", + "version" : "0.3", + "author" : "Ivan Yelizariev", + "category" : "Mail", + "website" : "https://it-projects.info", + "description": """Update 'Reply-to' field to catchall value in order to fix problem like that: + + 2014-01-18 06:25:56,532 6789 INFO trunk openerp.addons.mail.mail_thread: Routing mail from to admin@MYDOMAIN.com with Message-Id <49131390026345@web16h.yandex.ru>: direct alias match: (u'res.users', 1, {}, 1, browse_record(mail.alias, 1)) +2014-01-18 06:25:57,212 6789 ERROR trunk openerp.addons.base.ir.ir_mail_server: Mail delivery failed via SMTP server 'smtp.yandex.ru'. +SMTPSenderRefused: 553 +5.7.1 Sender address rejected: not owned by auth user. +MYLOGIN@yandex.ru +Traceback (most recent call last): + File "/mnt/files/src/openerp-server/server/openerp/addons/base/ir/ir_mail_server.py", line 465, in send_email + smtp.sendmail(smtp_from, smtp_to_list, message.as_string()) + File "/usr/lib/python2.7/smtplib.py", line 722, in sendmail + raise SMTPSenderRefused(code, resp, from_addr) +SMTPSenderRefused: (553, '5.7.1 Sender address rejected: not owned by auth user.', 'MYLOGIN@yandex.ru') + +2014-01-18 06:25:57,216 6789 ERROR trunk openerp.addons.mail.mail_mail: failed sending mail.mail 2 +Traceback (most recent call last): + File "/mnt/files/src/openerp-server/addons/mail/mail_mail.py", line 284, in send + context=context) + File "/mnt/files/src/openerp-server/server/openerp/addons/base/ir/ir_mail_server.py", line 478, in send_email + raise MailDeliveryException(_("Mail Delivery Failed"), msg) +MailDeliveryException: (u'Mail Delivery Failed', u"Mail delivery failed via SMTP server 'smtp.yandex.ru'.\nSMTPSenderRefused: 553\n5.7.1 Sender address rejected: not owned by auth user.\nMYLOGIN@yandex.ru") +2014-01-18 06:25:57,223 6789 INFO trunk openerp.addons.fetchmail.fetchmail: fetched/processed 1 email(s) on imap server yandex + + """, + "depends" : ["base", "mail"], + #"init_xml" : [], + #"update_xml" : [], + #"active": True, + "installable": True +} diff --git a/mail_fix_553.py b/mail_fix_553.py new file mode 100644 index 0000000..e528dcd --- /dev/null +++ b/mail_fix_553.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- + +import re +from openerp.osv import osv, fields +from openerp import SUPERUSER_ID + +class mail_mail(osv.Model): + _inherit = "mail.mail" + def send(self, cr, uid, ids, context=None, **kwargs): + catchall_alias = self.pool['ir.config_parameter'].get_param(cr, uid, "mail.catchall.alias", context=context) + catchall_domain = self.pool['ir.config_parameter'].get_param(cr, uid, "mail.catchall.domain", context=context) + + fix_ids = [] + for mail in self.browse(cr, SUPERUSER_ID, ids, context=context): + if re.search('@%s>?\s*$'%catchall_domain, mail.email_from) is None: + print 'fix:', mail.email_from + fix_ids.append(mail.id) + + email_from = '%s@%s' % (catchall_alias, catchall_domain) + print 'new email', email_from + + if fix_ids: + self.write(cr, uid, fix_ids, {'email_from': email_from}, context=context) + + return super(mail_mail, self).send(cr, uid, ids, context=context, **kwargs) From 71a4248a54d73c05d7f31b6a26b38fa457705075 Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Mon, 20 Jan 2014 14:21:16 +0600 Subject: [PATCH 02/22] rm print --- mail_fix_553.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/mail_fix_553.py b/mail_fix_553.py index e528dcd..378b4cb 100644 --- a/mail_fix_553.py +++ b/mail_fix_553.py @@ -13,11 +13,9 @@ class mail_mail(osv.Model): fix_ids = [] for mail in self.browse(cr, SUPERUSER_ID, ids, context=context): if re.search('@%s>?\s*$'%catchall_domain, mail.email_from) is None: - print 'fix:', mail.email_from fix_ids.append(mail.id) email_from = '%s@%s' % (catchall_alias, catchall_domain) - print 'new email', email_from if fix_ids: self.write(cr, uid, fix_ids, {'email_from': email_from}, context=context) From f460124c9a27b1bf195fd30134bc4b31446e2bc0 Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Thu, 6 Feb 2014 14:42:15 +0600 Subject: [PATCH 03/22] update description --- __openerp__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/__openerp__.py b/__openerp__.py index 7a9d6af..b9987d3 100644 --- a/__openerp__.py +++ b/__openerp__.py @@ -6,17 +6,17 @@ "website" : "https://it-projects.info", "description": """Update 'Reply-to' field to catchall value in order to fix problem like that: - 2014-01-18 06:25:56,532 6789 INFO trunk openerp.addons.mail.mail_thread: Routing mail from to admin@MYDOMAIN.com with Message-Id <49131390026345@web16h.yandex.ru>: direct alias match: (u'res.users', 1, {}, 1, browse_record(mail.alias, 1)) + 2014-01-18 06:25:56,532 6789 INFO trunk openerp.addons.mail.mail_thread: Routing mail from to info@MYDOMAIN.com with Message-Id <49131390026345@web16h.yandex.ru>: direct alias match: (u'res.users', 1, {}, 1, browse_record(mail.alias, 1)) 2014-01-18 06:25:57,212 6789 ERROR trunk openerp.addons.base.ir.ir_mail_server: Mail delivery failed via SMTP server 'smtp.yandex.ru'. SMTPSenderRefused: 553 5.7.1 Sender address rejected: not owned by auth user. -MYLOGIN@yandex.ru +user@CUSTOMER.com Traceback (most recent call last): File "/mnt/files/src/openerp-server/server/openerp/addons/base/ir/ir_mail_server.py", line 465, in send_email smtp.sendmail(smtp_from, smtp_to_list, message.as_string()) File "/usr/lib/python2.7/smtplib.py", line 722, in sendmail raise SMTPSenderRefused(code, resp, from_addr) -SMTPSenderRefused: (553, '5.7.1 Sender address rejected: not owned by auth user.', 'MYLOGIN@yandex.ru') +SMTPSenderRefused: (553, '5.7.1 Sender address rejected: not owned by auth user.', 'user@CUSTOMER.com') 2014-01-18 06:25:57,216 6789 ERROR trunk openerp.addons.mail.mail_mail: failed sending mail.mail 2 Traceback (most recent call last): @@ -24,7 +24,7 @@ Traceback (most recent call last): context=context) File "/mnt/files/src/openerp-server/server/openerp/addons/base/ir/ir_mail_server.py", line 478, in send_email raise MailDeliveryException(_("Mail Delivery Failed"), msg) -MailDeliveryException: (u'Mail Delivery Failed', u"Mail delivery failed via SMTP server 'smtp.yandex.ru'.\nSMTPSenderRefused: 553\n5.7.1 Sender address rejected: not owned by auth user.\nMYLOGIN@yandex.ru") +MailDeliveryException: (u'Mail Delivery Failed', u"Mail delivery failed via SMTP server 'smtp.yandex.ru'.\nSMTPSenderRefused: 553\n5.7.1 Sender address rejected: not owned by auth user.\nuser@CUSTOMER.com") 2014-01-18 06:25:57,223 6789 INFO trunk openerp.addons.fetchmail.fetchmail: fetched/processed 1 email(s) on imap server yandex """, From 27eb42fd28e6ae229e8c34da82b75919fe366284 Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Thu, 6 Feb 2014 16:19:37 +0600 Subject: [PATCH 04/22] more radical solution --- mail_fix_553.py | 109 ++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 100 insertions(+), 9 deletions(-) diff --git a/mail_fix_553.py b/mail_fix_553.py index 378b4cb..84a5604 100644 --- a/mail_fix_553.py +++ b/mail_fix_553.py @@ -1,23 +1,114 @@ # -*- coding: utf-8 -*- +import base64 +import logging import re -from openerp.osv import osv, fields +from urllib import urlencode +from urlparse import urljoin + +from openerp import tools from openerp import SUPERUSER_ID +from openerp.addons.base.ir.ir_mail_server import MailDeliveryException +from openerp.osv import fields, osv +from openerp.tools.translate import _ + +_logger = logging.getLogger(__name__) class mail_mail(osv.Model): _inherit = "mail.mail" - def send(self, cr, uid, ids, context=None, **kwargs): + def send(self, cr, uid, ids, auto_commit=False, raise_exception=False, context=None): + """ Sends the selected emails immediately, ignoring their current + state (mails that have already been sent should not be passed + unless they should actually be re-sent). + Emails successfully delivered are marked as 'sent', and those + that fail to be deliver are marked as 'exception', and the + corresponding error mail is output in the server logs. + + :param bool auto_commit: whether to force a commit of the mail status + after sending each mail (meant only for scheduler processing); + should never be True during normal transactions (default: False) + :param bool raise_exception: whether to raise an exception if the + email sending process has failed + :return: True + """ catchall_alias = self.pool['ir.config_parameter'].get_param(cr, uid, "mail.catchall.alias", context=context) catchall_domain = self.pool['ir.config_parameter'].get_param(cr, uid, "mail.catchall.domain", context=context) - fix_ids = [] + correct_email_from = '@%s>?\s*$'%catchall_domain + default_email_from = '%s@%s' % (catchall_alias, catchall_domain) + + ir_mail_server = self.pool.get('ir.mail_server') + for mail in self.browse(cr, SUPERUSER_ID, ids, context=context): - if re.search('@%s>?\s*$'%catchall_domain, mail.email_from) is None: - fix_ids.append(mail.id) + try: + # handle attachments + attachments = [] + for attach in mail.attachment_ids: + attachments.append((attach.datas_fname, base64.b64decode(attach.datas))) + # specific behavior to customize the send email for notified partners + email_list = [] + if mail.email_to: + email_list.append(self.send_get_email_dict(cr, uid, mail, context=context)) + for partner in mail.recipient_ids: + email_list.append(self.send_get_email_dict(cr, uid, mail, partner=partner, context=context)) + # headers + headers = {} + bounce_alias = self.pool['ir.config_parameter'].get_param(cr, uid, "mail.bounce.alias", context=context) + catchall_domain = self.pool['ir.config_parameter'].get_param(cr, uid, "mail.catchall.domain", context=context) + if bounce_alias and catchall_domain: + if mail.model and mail.res_id: + headers['Return-Path'] = '%s-%d-%s-%d@%s' % (bounce_alias, mail.id, mail.model, mail.res_id, catchall_domain) + else: + headers['Return-Path'] = '%s-%d@%s' % (bounce_alias, mail.id, catchall_domain) + + # build an RFC2822 email.message.Message object and send it without queuing + res = None + for email in email_list: + email_from = mail.email_from + if re.search(correct_email_from, email_from) is None: + email_from = default_email_from - email_from = '%s@%s' % (catchall_alias, catchall_domain) + msg = ir_mail_server.build_email( + email_from=email_from, + email_to=email.get('email_to'), + subject=email.get('subject'), + body=email.get('body'), + body_alternative=email.get('body_alternative'), + email_cc=tools.email_split(mail.email_cc), + reply_to=mail.reply_to, + attachments=attachments, + message_id=mail.message_id, + references=mail.references, + object_id=mail.res_id and ('%s-%s' % (mail.res_id, mail.model)), + subtype='html', + subtype_alternative='plain', + headers=headers) + res = ir_mail_server.send_email(cr, uid, msg, + mail_server_id=mail.mail_server_id.id, + context=context) + + if res: + mail.write({'state': 'sent', 'message_id': res}) + mail_sent = True + else: + mail.write({'state': 'exception'}) + mail_sent = False - if fix_ids: - self.write(cr, uid, fix_ids, {'email_from': email_from}, context=context) + # /!\ can't use mail.state here, as mail.refresh() will cause an error + # see revid:odo@openerp.com-20120622152536-42b2s28lvdv3odyr in 6.1 + if mail_sent: + self._postprocess_sent_message(cr, uid, mail, context=context) + except Exception as e: + _logger.exception('failed sending mail.mail %s', mail.id) + mail.write({'state': 'exception'}) + if raise_exception: + if isinstance(e, AssertionError): + # get the args of the original error, wrap into a value and throw a MailDeliveryException + # that is an except_orm, with name and value as arguments + value = '. '.join(e.args) + raise MailDeliveryException(_("Mail Delivery Failed"), value) + raise - return super(mail_mail, self).send(cr, uid, ids, context=context, **kwargs) + if auto_commit == True: + cr.commit() + return True From 86dfe59fdfbf43656c45b8669c3510d8a396465d Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Mon, 23 Jun 2014 11:28:35 +0600 Subject: [PATCH 05/22] update Reply-to if it posible --- __openerp__.py | 10 +++++++++- mail_fix_553.py | 5 ++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/__openerp__.py b/__openerp__.py index b9987d3..e100d20 100644 --- a/__openerp__.py +++ b/__openerp__.py @@ -4,7 +4,15 @@ "author" : "Ivan Yelizariev", "category" : "Mail", "website" : "https://it-projects.info", - "description": """Update 'Reply-to' field to catchall value in order to fix problem like that: + "description": """ +Module uses system parameters: + +* mail.catchall.alias +* mail.catchall.domain + +Module updates reply-to field if it posible to sender alias + +Module updates 'FROM' field to catchall value in order to fix problem like that: 2014-01-18 06:25:56,532 6789 INFO trunk openerp.addons.mail.mail_thread: Routing mail from to info@MYDOMAIN.com with Message-Id <49131390026345@web16h.yandex.ru>: direct alias match: (u'res.users', 1, {}, 1, browse_record(mail.alias, 1)) 2014-01-18 06:25:57,212 6789 ERROR trunk openerp.addons.base.ir.ir_mail_server: Mail delivery failed via SMTP server 'smtp.yandex.ru'. diff --git a/mail_fix_553.py b/mail_fix_553.py index 84a5604..8eb5ce4 100644 --- a/mail_fix_553.py +++ b/mail_fix_553.py @@ -65,8 +65,11 @@ class mail_mail(osv.Model): res = None for email in email_list: email_from = mail.email_from + reply_to = mail.reply_to if re.search(correct_email_from, email_from) is None: email_from = default_email_from + else: + reply_to = email_from msg = ir_mail_server.build_email( email_from=email_from, @@ -75,7 +78,7 @@ class mail_mail(osv.Model): body=email.get('body'), body_alternative=email.get('body_alternative'), email_cc=tools.email_split(mail.email_cc), - reply_to=mail.reply_to, + reply_to=reply_to, attachments=attachments, message_id=mail.message_id, references=mail.references, From 1019b4b234afa5b32ce60b0438ff120b842bf88c Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Thu, 19 Feb 2015 19:36:02 +0200 Subject: [PATCH 06/22] new website https://yelizariev.github.io/ --- __openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__openerp__.py b/__openerp__.py index e100d20..1585cc3 100644 --- a/__openerp__.py +++ b/__openerp__.py @@ -3,7 +3,7 @@ "version" : "0.3", "author" : "Ivan Yelizariev", "category" : "Mail", - "website" : "https://it-projects.info", + "website" : "https://yelizariev.github.io", "description": """ Module uses system parameters: From f613fcdf44a3a38351e4010df0294d593a2d5755 Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Thu, 19 Mar 2015 20:56:15 +0200 Subject: [PATCH 07/22] [REF] check email_from at mail.mail, because it's more stable variant across different versions of odoo [IMP] use new parameter for default alias: mail.catchall.alias_from --- README.rst | 19 ++++++++ __openerp__.py | 38 +--------------- data.xml | 10 +++++ mail_fix_553.py | 114 +++++++----------------------------------------- 4 files changed, 46 insertions(+), 135 deletions(-) create mode 100644 README.rst create mode 100644 data.xml diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..1cb7e68 --- /dev/null +++ b/README.rst @@ -0,0 +1,19 @@ +Fix mail error 553 +================== + +Module updates 'FROM' field to portal@MYDOMAIN.COM value in order to fix 553 error on a mail service that checks FROM field. + +E.g: + +* Customer send email from USER@CUSTOMER.com to info@MYDOMAIN.COM +* odoo accept email and try to send notifcation to related odoo users. E.g to admin@gmail.com. +* By default odoo prepare notification email with parameters as follows: + + * FROM: user@CUSTOMER.com + * TO: admin@gmail.com + +if you mail service provider, e.g. pdd.yandex.ru, doesn't allow emails with a FROM value differ from ...@MYDOMAIN.COM, then you get 553. This is why you need to update FROM value to portal@MYDOMAIN.COM + +You can configure default alias at Settings -> System Parameters -> mail.catchall.alias_from + +Tested on Odoo 8.0 d023c079ed86468436f25da613bf486a4a17d625 diff --git a/__openerp__.py b/__openerp__.py index 1585cc3..7dac0f3 100644 --- a/__openerp__.py +++ b/__openerp__.py @@ -1,44 +1,10 @@ { - "name" : "Fix error 553", + "name" : "Fix mail error 553", "version" : "0.3", "author" : "Ivan Yelizariev", "category" : "Mail", "website" : "https://yelizariev.github.io", - "description": """ -Module uses system parameters: - -* mail.catchall.alias -* mail.catchall.domain - -Module updates reply-to field if it posible to sender alias - -Module updates 'FROM' field to catchall value in order to fix problem like that: - - 2014-01-18 06:25:56,532 6789 INFO trunk openerp.addons.mail.mail_thread: Routing mail from to info@MYDOMAIN.com with Message-Id <49131390026345@web16h.yandex.ru>: direct alias match: (u'res.users', 1, {}, 1, browse_record(mail.alias, 1)) -2014-01-18 06:25:57,212 6789 ERROR trunk openerp.addons.base.ir.ir_mail_server: Mail delivery failed via SMTP server 'smtp.yandex.ru'. -SMTPSenderRefused: 553 -5.7.1 Sender address rejected: not owned by auth user. -user@CUSTOMER.com -Traceback (most recent call last): - File "/mnt/files/src/openerp-server/server/openerp/addons/base/ir/ir_mail_server.py", line 465, in send_email - smtp.sendmail(smtp_from, smtp_to_list, message.as_string()) - File "/usr/lib/python2.7/smtplib.py", line 722, in sendmail - raise SMTPSenderRefused(code, resp, from_addr) -SMTPSenderRefused: (553, '5.7.1 Sender address rejected: not owned by auth user.', 'user@CUSTOMER.com') - -2014-01-18 06:25:57,216 6789 ERROR trunk openerp.addons.mail.mail_mail: failed sending mail.mail 2 -Traceback (most recent call last): - File "/mnt/files/src/openerp-server/addons/mail/mail_mail.py", line 284, in send - context=context) - File "/mnt/files/src/openerp-server/server/openerp/addons/base/ir/ir_mail_server.py", line 478, in send_email - raise MailDeliveryException(_("Mail Delivery Failed"), msg) -MailDeliveryException: (u'Mail Delivery Failed', u"Mail delivery failed via SMTP server 'smtp.yandex.ru'.\nSMTPSenderRefused: 553\n5.7.1 Sender address rejected: not owned by auth user.\nuser@CUSTOMER.com") -2014-01-18 06:25:57,223 6789 INFO trunk openerp.addons.fetchmail.fetchmail: fetched/processed 1 email(s) on imap server yandex - - """, "depends" : ["base", "mail"], - #"init_xml" : [], - #"update_xml" : [], - #"active": True, + "data": ["data.xml"], "installable": True } diff --git a/data.xml b/data.xml new file mode 100644 index 0000000..411d614 --- /dev/null +++ b/data.xml @@ -0,0 +1,10 @@ + + + + + + mail.catchall.alias_from + portal + + + diff --git a/mail_fix_553.py b/mail_fix_553.py index 8eb5ce4..eb50abd 100644 --- a/mail_fix_553.py +++ b/mail_fix_553.py @@ -1,117 +1,33 @@ # -*- coding: utf-8 -*- - -import base64 -import logging import re -from urllib import urlencode -from urlparse import urljoin - -from openerp import tools from openerp import SUPERUSER_ID -from openerp.addons.base.ir.ir_mail_server import MailDeliveryException from openerp.osv import fields, osv -from openerp.tools.translate import _ +import logging _logger = logging.getLogger(__name__) -class mail_mail(osv.Model): +class mail_mail(osv.osv): _inherit = "mail.mail" - def send(self, cr, uid, ids, auto_commit=False, raise_exception=False, context=None): - """ Sends the selected emails immediately, ignoring their current - state (mails that have already been sent should not be passed - unless they should actually be re-sent). - Emails successfully delivered are marked as 'sent', and those - that fail to be deliver are marked as 'exception', and the - corresponding error mail is output in the server logs. - :param bool auto_commit: whether to force a commit of the mail status - after sending each mail (meant only for scheduler processing); - should never be True during normal transactions (default: False) - :param bool raise_exception: whether to raise an exception if the - email sending process has failed - :return: True - """ - catchall_alias = self.pool['ir.config_parameter'].get_param(cr, uid, "mail.catchall.alias", context=context) + def _fix_email_from(cr, uid, email_from): + catchall_alias = self.pool['ir.config_parameter'].get_param(cr, uid, "mail.catchall.alias_from", context=context) catchall_domain = self.pool['ir.config_parameter'].get_param(cr, uid, "mail.catchall.domain", context=context) correct_email_from = '@%s>?\s*$'%catchall_domain default_email_from = '%s@%s' % (catchall_alias, catchall_domain) - ir_mail_server = self.pool.get('ir.mail_server') - - for mail in self.browse(cr, SUPERUSER_ID, ids, context=context): - try: - # handle attachments - attachments = [] - for attach in mail.attachment_ids: - attachments.append((attach.datas_fname, base64.b64decode(attach.datas))) - # specific behavior to customize the send email for notified partners - email_list = [] - if mail.email_to: - email_list.append(self.send_get_email_dict(cr, uid, mail, context=context)) - for partner in mail.recipient_ids: - email_list.append(self.send_get_email_dict(cr, uid, mail, partner=partner, context=context)) - # headers - headers = {} - bounce_alias = self.pool['ir.config_parameter'].get_param(cr, uid, "mail.bounce.alias", context=context) - catchall_domain = self.pool['ir.config_parameter'].get_param(cr, uid, "mail.catchall.domain", context=context) - if bounce_alias and catchall_domain: - if mail.model and mail.res_id: - headers['Return-Path'] = '%s-%d-%s-%d@%s' % (bounce_alias, mail.id, mail.model, mail.res_id, catchall_domain) - else: - headers['Return-Path'] = '%s-%d@%s' % (bounce_alias, mail.id, catchall_domain) + if not email_from or re.search(correct_email_from, email_from) is None: + email_from = default_email_from + return email_from - # build an RFC2822 email.message.Message object and send it without queuing - res = None - for email in email_list: - email_from = mail.email_from - reply_to = mail.reply_to - if re.search(correct_email_from, email_from) is None: - email_from = default_email_from - else: - reply_to = email_from + def create(self, cr, uid, values, context=None): + if 'email_from' in values: + values['email_from'] = self._fix_email_from(cr, uid, values['email_from']) - msg = ir_mail_server.build_email( - email_from=email_from, - email_to=email.get('email_to'), - subject=email.get('subject'), - body=email.get('body'), - body_alternative=email.get('body_alternative'), - email_cc=tools.email_split(mail.email_cc), - reply_to=reply_to, - attachments=attachments, - message_id=mail.message_id, - references=mail.references, - object_id=mail.res_id and ('%s-%s' % (mail.res_id, mail.model)), - subtype='html', - subtype_alternative='plain', - headers=headers) - res = ir_mail_server.send_email(cr, uid, msg, - mail_server_id=mail.mail_server_id.id, - context=context) - - if res: - mail.write({'state': 'sent', 'message_id': res}) - mail_sent = True - else: - mail.write({'state': 'exception'}) - mail_sent = False + return super(mail_mail, self).create(cr, uid, values, context=context) - # /!\ can't use mail.state here, as mail.refresh() will cause an error - # see revid:odo@openerp.com-20120622152536-42b2s28lvdv3odyr in 6.1 - if mail_sent: - self._postprocess_sent_message(cr, uid, mail, context=context) - except Exception as e: - _logger.exception('failed sending mail.mail %s', mail.id) - mail.write({'state': 'exception'}) - if raise_exception: - if isinstance(e, AssertionError): - # get the args of the original error, wrap into a value and throw a MailDeliveryException - # that is an except_orm, with name and value as arguments - value = '. '.join(e.args) - raise MailDeliveryException(_("Mail Delivery Failed"), value) - raise + def write(self, cr, uid, ids, values, context=None): + if 'email_from' in values: + values['email_from'] = self._fix_email_from(cr, uid, values['email_from']) - if auto_commit == True: - cr.commit() - return True + return super(mail_mail, self).write(cr, uid, ids, values, context=context) From 06bc4446a5b544c59fe3577854626475f03b55da Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Thu, 19 Mar 2015 21:27:51 +0200 Subject: [PATCH 08/22] [REF] update email_from at mail.mail::send --- mail_fix_553.py | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/mail_fix_553.py b/mail_fix_553.py index eb50abd..7de82a0 100644 --- a/mail_fix_553.py +++ b/mail_fix_553.py @@ -9,25 +9,16 @@ _logger = logging.getLogger(__name__) class mail_mail(osv.osv): _inherit = "mail.mail" - def _fix_email_from(cr, uid, email_from): + def send(self, cr, uid, ids, context=None, **kwargs): catchall_alias = self.pool['ir.config_parameter'].get_param(cr, uid, "mail.catchall.alias_from", context=context) catchall_domain = self.pool['ir.config_parameter'].get_param(cr, uid, "mail.catchall.domain", context=context) correct_email_from = '@%s>?\s*$'%catchall_domain default_email_from = '%s@%s' % (catchall_alias, catchall_domain) - if not email_from or re.search(correct_email_from, email_from) is None: - email_from = default_email_from - return email_from - def create(self, cr, uid, values, context=None): - if 'email_from' in values: - values['email_from'] = self._fix_email_from(cr, uid, values['email_from']) - - return super(mail_mail, self).create(cr, uid, values, context=context) - - def write(self, cr, uid, ids, values, context=None): - if 'email_from' in values: - values['email_from'] = self._fix_email_from(cr, uid, values['email_from']) - - return super(mail_mail, self).write(cr, uid, ids, values, context=context) + for mail in self.browse(cr, SUPERUSER_ID, ids, context=context): + email_from = mail.email_from + if not email_from or re.search(correct_email_from, email_from) is None: + mail.email_from = default_email_from + return super(mail_mail, self).send(cr, uid, ids, context=context, **kwargs) From 59dbab6bf0a7fda9229cf57d68243ff2f8d54f17 Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Thu, 19 Mar 2015 21:29:33 +0200 Subject: [PATCH 09/22] [FIX] use v7 style write --- mail_fix_553.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mail_fix_553.py b/mail_fix_553.py index 7de82a0..3df265d 100644 --- a/mail_fix_553.py +++ b/mail_fix_553.py @@ -20,5 +20,5 @@ class mail_mail(osv.osv): for mail in self.browse(cr, SUPERUSER_ID, ids, context=context): email_from = mail.email_from if not email_from or re.search(correct_email_from, email_from) is None: - mail.email_from = default_email_from + mail.write({'email_from': default_email_from}) return super(mail_mail, self).send(cr, uid, ids, context=context, **kwargs) From ce9d37e8e3bb6053e8740d11a83c3e630c792652 Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Fri, 20 Mar 2015 20:15:51 +0200 Subject: [PATCH 10/22] [REF] come back to origin idea of redefining "send" function, because nothing else works * rewriting email_from field before executing "send" doesn't work because we lost email_from value of incoming email if sender was not in res.partner * it's impossible to inhering build_email function, because we don't have CR variable there. --- README.rst | 14 +++++ mail_fix_553.py | 153 ++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 163 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index 1cb7e68..7adff21 100644 --- a/README.rst +++ b/README.rst @@ -14,6 +14,20 @@ E.g: if you mail service provider, e.g. pdd.yandex.ru, doesn't allow emails with a FROM value differ from ...@MYDOMAIN.COM, then you get 553. This is why you need to update FROM value to portal@MYDOMAIN.COM +Configuration +============= + You can configure default alias at Settings -> System Parameters -> mail.catchall.alias_from +Known issues / Roadmap +====================== + +The module is consist of redefined send function from mail.mail +model. So it is just copy pasted source code with some +modification. This function is changed very rarely, but sometime it +can happens and the module should be updated. You can check commits +for mail_mail.py here: +https://github.com/odoo/odoo/commits/8.0/addons/mail/mail_mail.py + + Tested on Odoo 8.0 d023c079ed86468436f25da613bf486a4a17d625 diff --git a/mail_fix_553.py b/mail_fix_553.py index 3df265d..3aae65b 100644 --- a/mail_fix_553.py +++ b/mail_fix_553.py @@ -1,15 +1,40 @@ # -*- coding: utf-8 -*- -import re + +import base64 +import logging +from email.utils import formataddr +from urlparse import urljoin + +from openerp import api, tools from openerp import SUPERUSER_ID +from openerp.addons.base.ir.ir_mail_server import MailDeliveryException from openerp.osv import fields, osv +from openerp.tools.safe_eval import safe_eval as eval +from openerp.tools.translate import _ -import logging _logger = logging.getLogger(__name__) -class mail_mail(osv.osv): +class mail_mail(osv.Model): _inherit = "mail.mail" - def send(self, cr, uid, ids, context=None, **kwargs): + def send(self, cr, uid, ids, auto_commit=False, raise_exception=False, context=None): + # copy-paste from addons/mail/mail_mail.py + """ Sends the selected emails immediately, ignoring their current + state (mails that have already been sent should not be passed + unless they should actually be re-sent). + Emails successfully delivered are marked as 'sent', and those + that fail to be deliver are marked as 'exception', and the + corresponding error mail is output in the server logs. + + :param bool auto_commit: whether to force a commit of the mail status + after sending each mail (meant only for scheduler processing); + should never be True during normal transactions (default: False) + :param bool raise_exception: whether to raise an exception if the + email sending process has failed + :return: True + """ + + # NEW STUFF catchall_alias = self.pool['ir.config_parameter'].get_param(cr, uid, "mail.catchall.alias_from", context=context) catchall_domain = self.pool['ir.config_parameter'].get_param(cr, uid, "mail.catchall.domain", context=context) @@ -17,6 +42,126 @@ class mail_mail(osv.osv): default_email_from = '%s@%s' % (catchall_alias, catchall_domain) + context = dict(context or {}) + ir_mail_server = self.pool.get('ir.mail_server') + ir_attachment = self.pool['ir.attachment'] + for mail in self.browse(cr, SUPERUSER_ID, ids, context=context): + try: + # TDE note: remove me when model_id field is present on mail.message - done here to avoid doing it multiple times in the sub method + if mail.model: + model_id = self.pool['ir.model'].search(cr, SUPERUSER_ID, [('model', '=', mail.model)], context=context)[0] + model = self.pool['ir.model'].browse(cr, SUPERUSER_ID, model_id, context=context) + else: + model = None + if model: + context['model_name'] = model.name + + # load attachment binary data with a separate read(), as prefetching all + # `datas` (binary field) could bloat the browse cache, triggerring + # soft/hard mem limits with temporary data. + attachment_ids = [a.id for a in mail.attachment_ids] + attachments = [(a['datas_fname'], base64.b64decode(a['datas'])) + for a in ir_attachment.read(cr, SUPERUSER_ID, attachment_ids, + ['datas_fname', 'datas'])] + + # specific behavior to customize the send email for notified partners + email_list = [] + if mail.email_to: + email_list.append(self.send_get_email_dict(cr, uid, mail, context=context)) + for partner in mail.recipient_ids: + email_list.append(self.send_get_email_dict(cr, uid, mail, partner=partner, context=context)) + # headers + headers = {} + bounce_alias = self.pool['ir.config_parameter'].get_param(cr, uid, "mail.bounce.alias", context=context) + catchall_domain = self.pool['ir.config_parameter'].get_param(cr, uid, "mail.catchall.domain", context=context) + if bounce_alias and catchall_domain: + if mail.model and mail.res_id: + headers['Return-Path'] = '%s-%d-%s-%d@%s' % (bounce_alias, mail.id, mail.model, mail.res_id, catchall_domain) + else: + headers['Return-Path'] = '%s-%d@%s' % (bounce_alias, mail.id, catchall_domain) + if mail.headers: + try: + headers.update(eval(mail.headers)) + except Exception: + pass + + # Writing on the mail object may fail (e.g. lock on user) which + # would trigger a rollback *after* actually sending the email. + # To avoid sending twice the same email, provoke the failure earlier + mail.write({'state': 'exception'}) + mail_sent = False + + # build an RFC2822 email.message.Message object and send it without queuing + res = None + for email in email_list: + + # NEW STUFF + email_from = mail.email_from + if re.search(correct_email_from, email_from) is None: + email_from = default_email_from + + msg = ir_mail_server.build_email( + email_from=email_from, # NEW STUFF + email_to=email.get('email_to'), + subject=email.get('subject'), + body=email.get('body'), + body_alternative=email.get('body_alternative'), + email_cc=tools.email_split(mail.email_cc), + reply_to=mail.reply_to, + attachments=attachments, + message_id=mail.message_id, + references=mail.references, + object_id=mail.res_id and ('%s-%s' % (mail.res_id, mail.model)), + subtype='html', + subtype_alternative='plain', + headers=headers) + try: + res = ir_mail_server.send_email(cr, uid, msg, + mail_server_id=mail.mail_server_id.id, + context=context) + except AssertionError as error: + if error.message == ir_mail_server.NO_VALID_RECIPIENT: + # No valid recipient found for this particular + # mail item -> ignore error to avoid blocking + # delivery to next recipients, if any. If this is + # the only recipient, the mail will show as failed. + _logger.warning("Ignoring invalid recipients for mail.mail %s: %s", + mail.message_id, email.get('email_to')) + else: + raise + if res: + mail.write({'state': 'sent', 'message_id': res}) + mail_sent = True + + # /!\ can't use mail.state here, as mail.refresh() will cause an error + # see revid:odo@openerp.com-20120622152536-42b2s28lvdv3odyr in 6.1 + if mail_sent: + _logger.info('Mail with ID %r and Message-Id %r successfully sent', mail.id, mail.message_id) + self._postprocess_sent_message(cr, uid, mail, context=context, mail_sent=mail_sent) + except MemoryError: + # prevent catching transient MemoryErrors, bubble up to notify user or abort cron job + # instead of marking the mail as failed + _logger.exception('MemoryError while processing mail with ID %r and Msg-Id %r. '\ + 'Consider raising the --limit-memory-hard startup option', + mail.id, mail.message_id) + raise + except Exception as e: + _logger.exception('failed sending mail.mail %s', mail.id) + mail.write({'state': 'exception'}) + self._postprocess_sent_message(cr, uid, mail, context=context, mail_sent=False) + if raise_exception: + if isinstance(e, AssertionError): + # get the args of the original error, wrap into a value and throw a MailDeliveryException + # that is an except_orm, with name and value as arguments + value = '. '.join(e.args) + raise MailDeliveryException(_("Mail Delivery Failed"), value) + raise + + if auto_commit is True: + cr.commit() + return True + + for mail in self.browse(cr, SUPERUSER_ID, ids, context=context): email_from = mail.email_from if not email_from or re.search(correct_email_from, email_from) is None: From a3ea6113cb71d302f49f75808b391ece91048b10 Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Fri, 20 Mar 2015 21:14:52 +0200 Subject: [PATCH 11/22] [FIX] import re --- mail_fix_553.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/mail_fix_553.py b/mail_fix_553.py index 3aae65b..167435a 100644 --- a/mail_fix_553.py +++ b/mail_fix_553.py @@ -14,6 +14,8 @@ from openerp.tools.translate import _ _logger = logging.getLogger(__name__) +import re + class mail_mail(osv.Model): _inherit = "mail.mail" @@ -160,10 +162,3 @@ class mail_mail(osv.Model): if auto_commit is True: cr.commit() return True - - - for mail in self.browse(cr, SUPERUSER_ID, ids, context=context): - email_from = mail.email_from - if not email_from or re.search(correct_email_from, email_from) is None: - mail.write({'email_from': default_email_from}) - return super(mail_mail, self).send(cr, uid, ids, context=context, **kwargs) From 54e4461f6764cae73192c61c1c100845d8f2285f Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Tue, 31 Mar 2015 15:51:00 +0200 Subject: [PATCH 12/22] [DOC] add link to issue https://github.com/odoo/odoo/issues/5864 --- README.rst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 7adff21..dd6b9ee 100644 --- a/README.rst +++ b/README.rst @@ -29,5 +29,10 @@ can happens and the module should be updated. You can check commits for mail_mail.py here: https://github.com/odoo/odoo/commits/8.0/addons/mail/mail_mail.py - Tested on Odoo 8.0 d023c079ed86468436f25da613bf486a4a17d625 + +Status +====== + +Related issue at odoo's tracker: https://github.com/odoo/odoo/issues/5864 + From 95a91b843e4bfc982d7eca187f006e6137600d91 Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Thu, 2 Jul 2015 16:35:12 +0500 Subject: [PATCH 13/22] [DOC] add icon --- static/description/icon.png | Bin 0 -> 2140 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 static/description/icon.png diff --git a/static/description/icon.png b/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..79f7d8fe294f838cf2996940c40dc08dde60642f GIT binary patch literal 2140 zcmV-i2&4CjP)=D+Wys1fe}G$Q#Z2832St25n<}h#$%L7sUBHn zgVlR~4gtNOs+KA#@5q|?_&of{fCW3h;+eI-@is^))^C>Ap=O06Yq-$?c7APo?&VKv z))(zizAhAwtYInZ&irDhM>SGBFM>?d${LzoxNVMo=er+dj|dVX82(itvPy&nJI7R} zxal|{b!VXeY~=?NW24HG!g#W&q%^mz9C_k)O~vB$l!nR>c7Azkc41B0?h`G%re>$6 zR3XK_wP$L$`wA`+vfQ*It2kJ&bC8N#=Y*z`?T#poH4<6rMKBSth@G$Anh#P6geeX3 z66#s7^ZuFn%%U9v!&L5`a;i`|jy4C6tV1;wvTsBRf(1LrR7N-{7FL;Ru=vP|@loCg zW(jHMC_PwJ+DqF+1@u$zm8o8m$Y1m0V>0T?5;C37EIq_^W|6qn&f)G(Em&B}uDzZf z*)+}sw{t=Y4awlQ*0UI=qn@0G^f!D}&U?lzXXnrqYS25*U`_+Qpa)L`slkiwNPnpt zbLhf?onzn&_-r^=Y+@25re#c%ToI(Yb5h;e6h}ke&V&2_vM3~m`<859t@^AmkXN#4 zp3=nL641^=Hb@NJ0y10#e8NYUd#FM=yd}$j-ZOZiJuPn=y})eY?Y#H?ythe(9+=(P z=pO{n_Ag1zK#!ilNhilfXs;Am_;fC9#?QGvtNfjZ8h);==7&rFJ5QsnusaH>>SjHY zMC`QRjtOGt!fz}(jiG1vi5A$ZVuAvl9f!Vzpm3p#doq~Eg#RkU_3sSy1kxiU%8{*-oYZcOz=#QLgi{iP%6NR;q2W-(ziFHtAxczhQ%>g55VsxmVxu{OgA(z8>)V_eL6l3DJe$G5=tJp1|FDThBVI=FE7j=3tSDuEI+K+>VJ0yjG=W@S`oh zY;UN?#paSycm6BhAH$yR>Hg=JAHz8+5-u#Cw5f387dA))IagN=LE)YiRtGqa4{&&- z?Akk2Q!(?$O{HOxfl1vpCei`ivon?ZK`rFDC~Jz{*?3agX(WqeLDAmP6g%rA0{0<> zeqtzKYj)#fyZMfN2OiuS5UVdK(E;HAX;YO|@Z}oGtA&1=LO(l>HnWdoj~#w9CnQPu zz$YVGP~7xI^+ijcUcstRfTEHe{7dZ7Q=w&u@tA}I)g3C3b#`)vCi?y*=jMs3M4_;7 z>sC2k0T-cEZ{)}r0)&rGk$e2;VuY_meg`{ogL|Bk!JluaKhH%NZ8kn?5uft;?gWym z*MCY|fYs06&r)EvXweNU2#O3lwsaSN3LjB|<)5GbI&(^F8Ja$Saf5Dn zfe8N*NS_HTjLe(YbWiuKO3@!C&=suZc=@z@*Skh)DrGicOE-M=A%!7Zj9>aSC(&v#nWVj-o?-d4Br_8Z zDP85P;LTw*XT(K^Ln=~W$+dIA7^DnX@{`gzERF6PYOuNDqSwU8{M+dh76b)Z$^Np8 zK`L@#(IcfdSX4>r$FmU4GvlLe(Pp~uq7PD-^kM2p`;8cbRHVRCk`&s%0t^5+Kg1eL SSUIi$0000 Date: Wed, 8 Jul 2015 09:20:21 +0500 Subject: [PATCH 14/22] [DOC] fix modules categories --- __openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__openerp__.py b/__openerp__.py index 7dac0f3..4d2a5e0 100644 --- a/__openerp__.py +++ b/__openerp__.py @@ -2,7 +2,7 @@ "name" : "Fix mail error 553", "version" : "0.3", "author" : "Ivan Yelizariev", - "category" : "Mail", + "category" : "Social Network", "website" : "https://yelizariev.github.io", "depends" : ["base", "mail"], "data": ["data.xml"], From 57082697f9c01894f03c20e7869426e148cb91b5 Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Sun, 27 Sep 2015 10:20:30 +0500 Subject: [PATCH 15/22] [DOC] add IT-Projects LLC to authors --- __openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__openerp__.py b/__openerp__.py index 4d2a5e0..8bbb8c9 100644 --- a/__openerp__.py +++ b/__openerp__.py @@ -1,7 +1,7 @@ { "name" : "Fix mail error 553", "version" : "0.3", - "author" : "Ivan Yelizariev", + "author" : "IT-Projects LLC, Ivan Yelizariev", "category" : "Social Network", "website" : "https://yelizariev.github.io", "depends" : ["base", "mail"], From fd75d366fe6870fb8c40d894e02ca18decf84591 Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Sun, 27 Sep 2015 10:22:56 +0500 Subject: [PATCH 16/22] [DOC] add IT-Projects LLC to authors --- __openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__openerp__.py b/__openerp__.py index 4d2a5e0..8bbb8c9 100644 --- a/__openerp__.py +++ b/__openerp__.py @@ -1,7 +1,7 @@ { "name" : "Fix mail error 553", "version" : "0.3", - "author" : "Ivan Yelizariev", + "author" : "IT-Projects LLC, Ivan Yelizariev", "category" : "Social Network", "website" : "https://yelizariev.github.io", "depends" : ["base", "mail"], From 81ac8731030835ea163ed73a953983a894e76bb5 Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Fri, 16 Oct 2015 13:07:01 +0500 Subject: [PATCH 17/22] mark unported modules as non-installable --- __openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__openerp__.py b/__openerp__.py index 8bbb8c9..751f44e 100644 --- a/__openerp__.py +++ b/__openerp__.py @@ -6,5 +6,5 @@ "website" : "https://yelizariev.github.io", "depends" : ["base", "mail"], "data": ["data.xml"], - "installable": True + 'installable': False } From bc0fc59d78c5b088d233ee9e893e234048235e22 Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Tue, 3 Nov 2015 10:22:20 +0500 Subject: [PATCH 18/22] [DOC] add license tag --- __openerp__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/__openerp__.py b/__openerp__.py index 8bbb8c9..ffe9a16 100644 --- a/__openerp__.py +++ b/__openerp__.py @@ -2,6 +2,7 @@ "name" : "Fix mail error 553", "version" : "0.3", "author" : "IT-Projects LLC, Ivan Yelizariev", + 'license': 'LGPL-3', "category" : "Social Network", "website" : "https://yelizariev.github.io", "depends" : ["base", "mail"], From fbebbe63d0b38d8f51a712fdddc4cdc4681fc0ce Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Mon, 9 Nov 2015 11:26:31 +0500 Subject: [PATCH 19/22] update license to GPL-3 --- __openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__openerp__.py b/__openerp__.py index ffe9a16..e9620f7 100644 --- a/__openerp__.py +++ b/__openerp__.py @@ -2,7 +2,7 @@ "name" : "Fix mail error 553", "version" : "0.3", "author" : "IT-Projects LLC, Ivan Yelizariev", - 'license': 'LGPL-3', + 'license': 'GPL-3', "category" : "Social Network", "website" : "https://yelizariev.github.io", "depends" : ["base", "mail"], From e9a10a2ea88c6abe324f91a9e8cb2dbf83424e6a Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Mon, 9 Nov 2015 11:36:05 +0500 Subject: [PATCH 20/22] Revert "update license to GPL-3" This reverts commit 6157ee932163b56a3a0ad3a64cefb93e190c5c1d. Conflicts: _web_last_viewed_records/__openerp__.py itprojects_sale/__openerp__.py itprojects_website/__openerp__.py mail_delete_access_link/__openerp__.py mail_delete_sent_by_footer/__openerp__.py money_for/__openerp__.py --- __openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__openerp__.py b/__openerp__.py index 81c1327..b4c13e7 100644 --- a/__openerp__.py +++ b/__openerp__.py @@ -2,7 +2,7 @@ "name" : "Fix mail error 553", "version" : "0.3", "author" : "IT-Projects LLC, Ivan Yelizariev", - 'license': 'GPL-3', + 'license': 'LGPL-3', "category" : "Social Network", "website" : "https://yelizariev.github.io", "depends" : ["base", "mail"], From ef1875252018f9a4b1a578b88af58c5118fb9f84 Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Fri, 20 Nov 2015 17:27:17 +0500 Subject: [PATCH 21/22] update status --- README.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index dd6b9ee..bfb1799 100644 --- a/README.rst +++ b/README.rst @@ -34,5 +34,8 @@ Tested on Odoo 8.0 d023c079ed86468436f25da613bf486a4a17d625 Status ====== -Related issue at odoo's tracker: https://github.com/odoo/odoo/issues/5864 +Related issues at odoo's tracker: +* https://github.com/odoo/odoo/issues/5864 +* https://github.com/odoo/odoo/issues/3347 +Fix: https://github.com/odoo-dev/odoo/commit/a4597fe34fcfa8dae28b156410080346bb33af33 From 0b82d2c95257db67ff83bfd65b1b5da57a9319a9 Mon Sep 17 00:00:00 2001 From: Ildar Nasyrov Date: Sun, 27 Mar 2016 16:26:09 +0500 Subject: [PATCH 22/22] [MOV] module -- mail_fix_553 --- README.rst => mail_fix_553/README.rst | 0 __init__.py => mail_fix_553/__init__.py | 0 __openerp__.py => mail_fix_553/__openerp__.py | 0 data.xml => mail_fix_553/data.xml | 0 mail_fix_553.py => mail_fix_553/mail_fix_553.py | 0 .../static}/description/icon.png | Bin 6 files changed, 0 insertions(+), 0 deletions(-) rename README.rst => mail_fix_553/README.rst (100%) rename __init__.py => mail_fix_553/__init__.py (100%) rename __openerp__.py => mail_fix_553/__openerp__.py (100%) rename data.xml => mail_fix_553/data.xml (100%) rename mail_fix_553.py => mail_fix_553/mail_fix_553.py (100%) rename {static => mail_fix_553/static}/description/icon.png (100%) diff --git a/README.rst b/mail_fix_553/README.rst similarity index 100% rename from README.rst rename to mail_fix_553/README.rst diff --git a/__init__.py b/mail_fix_553/__init__.py similarity index 100% rename from __init__.py rename to mail_fix_553/__init__.py diff --git a/__openerp__.py b/mail_fix_553/__openerp__.py similarity index 100% rename from __openerp__.py rename to mail_fix_553/__openerp__.py diff --git a/data.xml b/mail_fix_553/data.xml similarity index 100% rename from data.xml rename to mail_fix_553/data.xml diff --git a/mail_fix_553.py b/mail_fix_553/mail_fix_553.py similarity index 100% rename from mail_fix_553.py rename to mail_fix_553/mail_fix_553.py diff --git a/static/description/icon.png b/mail_fix_553/static/description/icon.png similarity index 100% rename from static/description/icon.png rename to mail_fix_553/static/description/icon.png