diff --git a/mail_fix_empty_body/README.rst b/mail_fix_empty_body/README.rst new file mode 100644 index 0000000..7be4736 --- /dev/null +++ b/mail_fix_empty_body/README.rst @@ -0,0 +1,6 @@ +Fix "False" in empty email body +=============================== + +Description: https://apps.odoo.com/apps/modules/8.0/mail_fix_empty_body/ + +Tested on Odoo 8.0 ab7b5d7732a7c222a0aea45bd173742acd47242d diff --git a/mail_fix_empty_body/__init__.py b/mail_fix_empty_body/__init__.py new file mode 100644 index 0000000..bff786c --- /dev/null +++ b/mail_fix_empty_body/__init__.py @@ -0,0 +1 @@ +import models diff --git a/mail_fix_empty_body/__openerp__.py b/mail_fix_empty_body/__openerp__.py new file mode 100644 index 0000000..a4212da --- /dev/null +++ b/mail_fix_empty_body/__openerp__.py @@ -0,0 +1,14 @@ +{ + 'name' : 'Fix "False" in empty email body', + 'version' : '1.0.0', + 'author' : 'IT-Projects LLC, Ivan Yelizariev', + 'license': 'LGPL-3', + 'category': 'Social Network', + 'website' : 'https://twitter.com/yelizariev', + 'price': 9.00, + 'currency': 'EUR', + 'depends' : ['mail'], + 'data':[ + ], + 'installable': False +} diff --git a/mail_fix_empty_body/models.py b/mail_fix_empty_body/models.py new file mode 100644 index 0000000..0d45e2d --- /dev/null +++ b/mail_fix_empty_body/models.py @@ -0,0 +1,10 @@ +from openerp import api, models, fields, SUPERUSER_ID + +class mail_compose_message(models.TransientModel): + _inherit = 'mail.compose.message' + + def get_mail_values(self, cr, uid, wizard, res_ids, context=None): + res = super(mail_compose_message, self).get_mail_values(cr, uid, wizard, res_ids, context) + for id, d in res.iteritems(): + d['body'] = d.get('body') or '' + return res diff --git a/mail_fix_empty_body/static/description/icon.png b/mail_fix_empty_body/static/description/icon.png new file mode 100644 index 0000000..79f7d8f Binary files /dev/null and b/mail_fix_empty_body/static/description/icon.png differ diff --git a/mail_fix_empty_body/static/description/index.html b/mail_fix_empty_body/static/description/index.html new file mode 100644 index 0000000..836d00d --- /dev/null +++ b/mail_fix_empty_body/static/description/index.html @@ -0,0 +1,65 @@ +
+
+
+

Fix "False" in empty email body

+

Feel free to send emails without body

+
+ +
+

+ Some time you need to send email with empty body.
E.g. to send some file to partner. +

+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+ +
+

+ There is a bug in odoo -- it sends "False" if email body if empty. +

+
+
+
+ + +
+
+
+

+ This module just fix the issue. +

+
+
+
+ +
+
+
+
+ +
+
+ +
+
diff --git a/mail_fix_empty_body/static/description/receive-false.png b/mail_fix_empty_body/static/description/receive-false.png new file mode 100644 index 0000000..be440c0 Binary files /dev/null and b/mail_fix_empty_body/static/description/receive-false.png differ diff --git a/mail_fix_empty_body/static/description/receive-ok.png b/mail_fix_empty_body/static/description/receive-ok.png new file mode 100644 index 0000000..845424f Binary files /dev/null and b/mail_fix_empty_body/static/description/receive-ok.png differ diff --git a/mail_fix_empty_body/static/description/send.png b/mail_fix_empty_body/static/description/send.png new file mode 100644 index 0000000..92cafa4 Binary files /dev/null and b/mail_fix_empty_body/static/description/send.png differ