From d423e51e1aea682967a26ecf102de9ef1886528c Mon Sep 17 00:00:00 2001 From: manawi Date: Tue, 4 Oct 2016 11:31:14 +0500 Subject: [PATCH] fixes for travis (#264) [FIX] lint fixes * [FIX] web_calendar_repeat_form: remove duplicate description form __openerp__.py * [FIX] web_calendar_quick_navigation: remove duplicate key 'description' * [FIX] project_description: remove duplicate key 'demo_xml' * [FIX] web_session_managment: relative import http * [FIX] product_image_filestore: '\' changed to '/' * [FIX] currency_rate_update: don't use {} as argument * [FIX] web_logo/contrillers: remove Unreacheble code * [FIX] res_partner_phone: do not assign a lambda expression * [FIX] currency_rate_update: continuation line unaligned for hanging indent * [FIX] flake8 E302 * [FIX] flake8 F841 * [FIX] flake8 F841 * [FIX] currency_rate_update: Use of eval * [FIX] delivery_special: Use of eval * [FIX] autopep8 * [FIX] unused imports * [FIX] fix comments * [FIX] rst-files * [FIX] flake8 * [FIX] flake8: product_image_filestore --- im_notif/im_notif_models.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) 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