commit 2f049b28786405ee592885e22cfcb26b016efc3f Author: Ivan Yelizariev Date: Mon Jan 19 17:25:20 2015 +0200 [IMP] upload mail_fix_empty_body diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..bff786c --- /dev/null +++ b/__init__.py @@ -0,0 +1 @@ +import models diff --git a/__openerp__.py b/__openerp__.py new file mode 100644 index 0000000..8948816 --- /dev/null +++ b/__openerp__.py @@ -0,0 +1,15 @@ +{ + 'name' : 'Fix "False" in empty email', + 'version' : '1.0.0', + 'author' : 'Ivan Yelizariev', + 'category' : 'Sale', + 'website' : 'https://it-projects.info', + 'description': """ + +Tested on Odoo 8.0 ab7b5d7732a7c222a0aea45bd173742acd47242d + """, + 'depends' : ['mail'], + 'data':[ + ], + 'installable': True +} diff --git a/models.py b/models.py new file mode 100644 index 0000000..0d45e2d --- /dev/null +++ b/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