[MERGE] mail: gracefully handle missing user signature
authorOlivier Dony <odo@openerp.com>
Wed, 22 Feb 2012 11:25:55 +0000 (12:25 +0100)
committerOlivier Dony <odo@openerp.com>
Wed, 22 Feb 2012 11:25:55 +0000 (12:25 +0100)
bzr revid: odo@openerp.com-20120222112555-5j7cqaimndmc2lew

1  2 
addons/mail/wizard/mail_compose_message.py

@@@ -147,7 -147,7 +147,7 @@@ class mail_compose_message(osv.osv_memo
              # as it is easier to quote than the HTML version.
              # XXX TODO: make it possible to switch to HTML on the fly
              current_user = self.pool.get('res.users').browse(cr, uid, uid, context)
-             body = message_data.body_text or current_user.signature 
 -            body = message_data.body_text or current_user.signature  or ''
++            body = message_data.body_text or current_user.signature or ''
              if context.get('mail.compose.message.mode') == 'reply':
                  sent_date = _('On %(date)s, ') % {'date': message_data.date} if message_data.date else ''
                  sender = _('%(sender_name)s wrote:') % {'sender_name': tools.ustr(message_data.email_from or _('You'))}