From 9c54520f3669262490223f5c1ce68b136ff65e36 Mon Sep 17 00:00:00 2001 From: "Pinakin Nayi (OpenERP)" Date: Wed, 4 Jul 2012 14:46:13 +0530 Subject: [PATCH] [IMP]server-log-warning bzr revid: pna@tinyerp.com-20120704091613-i7vxzgq8hgmv20s5 --- addons/l10n_uk/demo/demo.xml | 4 ++-- addons/mail/mail_thread.py | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/addons/l10n_uk/demo/demo.xml b/addons/l10n_uk/demo/demo.xml index 1184828df50..f1d5088c825 100644 --- a/addons/l10n_uk/demo/demo.xml +++ b/addons/l10n_uk/demo/demo.xml @@ -1,6 +1,6 @@ - + UK OpenERP Partner smartmode http://www.smartmode.co.uk @@ -12,7 +12,7 @@ Vadim Chobanu HA4 7JW Ruislip - + vadim@smartmode.co.uk +44 (0) 8456434548 diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py index 5668709af17..3d65f1313a6 100644 --- a/addons/mail/mail_thread.py +++ b/addons/mail/mail_thread.py @@ -202,7 +202,6 @@ class mail_thread(osv.Model): def message_create_get_notification_user_ids(self, cr, uid, thread_ids, new_msg_vals, context=None): if context is None: context = {} - notif_user_ids = [] body = new_msg_vals.get('body_html', '') if new_msg_vals.get('subtype', 'plain') == 'html' else new_msg_vals.get('body_text', '') for thread_id in thread_ids: @@ -880,7 +879,7 @@ class mail_thread(osv.Model): """ When creating a new message, set as unread if uid is not the object responsible. """ for obj in self.browse(cr, uid, ids, context=context): - if obj.message_state and hasattr(obj, 'user_id') and (not obj.user_id or obj.user_id.id != uid): + if obj.message_state and ('user_id' in obj._columns.keys()) and (not obj.user_id or obj.user_id.id != uid) : self.message_mark_as_unread(cr, uid, [obj.id], context=context) def message_check_and_set_unread(self, cr, uid, ids, context=None):