diff --git a/im_notif/im_notif_models.py b/im_notif/im_notif_models.py index f45e50d..d12752a 100644 --- a/im_notif/im_notif_models.py +++ b/im_notif/im_notif_models.py @@ -3,7 +3,6 @@ from openerp import SUPERUSER_ID from openerp import models from openerp import tools from openerp.osv import fields as old_fields -from openerp.tools.translate import _ class ResPartner(models.Model): @@ -82,11 +81,6 @@ class MailNotification(models.Model): ) author = message.author_id and message.author_id.name_get() author = author and author[0][1] or message.email_from - # body = html2plaintext(message.body)[:100] or '' - mtype = {'email': _('Email'), - 'comment': _('Comment'), - 'notification': _('System notification'), - }.get(message.type, '') about = message.subject or message.record_name or 'UNDEFINED' about = '[ABOUT] %s' % about @@ -126,7 +120,7 @@ class MailNotification(models.Model): session = session_obj.session_get(cr, user_from, user_to, context=context) uuid = session.get('uuid') message_content = '\n'.join(im_text) - message_id = self.pool["im_chat.message"].post(cr, SUPERUSER_ID, user_from, uuid, message_type, message_content, context=context) + self.pool["im_chat.message"].post(cr, SUPERUSER_ID, user_from, uuid, message_type, message_content, context=context) return True