Browse Source

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
pull/183/head
manawi 8 years ago
committed by Ivan Yelizariev
parent
commit
34cd2750ec
  1. 8
      im_notif/im_notif_models.py

8
im_notif/im_notif_models.py

@ -3,7 +3,6 @@ from openerp import SUPERUSER_ID
from openerp import models from openerp import models
from openerp import tools from openerp import tools
from openerp.osv import fields as old_fields from openerp.osv import fields as old_fields
from openerp.tools.translate import _
class ResPartner(models.Model): class ResPartner(models.Model):
@ -82,11 +81,6 @@ class MailNotification(models.Model):
) )
author = message.author_id and message.author_id.name_get() author = message.author_id and message.author_id.name_get()
author = author and author[0][1] or message.email_from 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 = message.subject or message.record_name or 'UNDEFINED'
about = '[ABOUT] %s' % about about = '[ABOUT] %s' % about
@ -126,7 +120,7 @@ class MailNotification(models.Model):
session = session_obj.session_get(cr, user_from, user_to, context=context) session = session_obj.session_get(cr, user_from, user_to, context=context)
uuid = session.get('uuid') uuid = session.get('uuid')
message_content = '\n'.join(im_text) 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 return True

Loading…
Cancel
Save