[CLEAN] Small cleanup of code.

bzr revid: tde@openerp.com-20121220121752-31a5ulkwg1k7v961
This commit is contained in:
Thibault Delavallée 2012-12-20 13:17:52 +01:00
parent a8669ef64e
commit 6fd2f14e3b
2 changed files with 8 additions and 11 deletions

View File

@ -350,15 +350,9 @@ class mail_message(osv.Model):
vote_nb = len(message.vote_user_ids)
has_voted = uid in [user.id for user in message.vote_user_ids]
# TDE tmp hack
if not message.body:
body = ''
else:
body = html_email_clean(message.body or '')
return {'id': message.id,
'type': message.type,
'body': body,
'body': html_email_clean(message.body or ''),
'model': message.model,
'res_id': message.res_id,
'record_name': message.record_name,

View File

@ -38,13 +38,16 @@ class mail_message_subtype(osv.osv):
'precisely tune the notifications the user want to receive on its wall.'),
'description': fields.text('Description', translate=True,
help='Description that will be added in the message posted for this '\
'subtype. If void, no message will be added.'),
'subtype. If void, the name will be added instead.'),
'parent_id': fields.many2one('mail.message.subtype', string='Parent',
ondelete='set null'),
ondelete='set null',
help='Parent subtype, used for automatic subscription.'),
'relation_field': fields.char('Relation field',
help='Field used to link the related model to the subtype model'),
help='Field used to link the related model to the subtype model when '\
'using automatic subscription on a related document. The field '\
'is used to compute getattr(related_document.relation_field).'),
'res_model': fields.char('Model',
help="Model the subtype applies to. If False, this subtype exists for all models."),
help="Model the subtype applies to. If False, this subtype applies to all models."),
'default': fields.boolean('Default',
help="Activated by default when subscribing."),
}