diff --git a/mail_move_message_models.py b/mail_move_message_models.py index 8361cc1..c90fd5b 100644 --- a/mail_move_message_models.py +++ b/mail_move_message_models.py @@ -181,3 +181,8 @@ class mail_message(models.Model): extended_name = ' [%s] ID %s' % (record.get('model', 'UNDEF'), record.get('res_id', 'UNDEF')) res.append((record['id'], name + extended_name)) return res + + def _message_read_dict(self, cr, uid, message, parent_id=False, context=None): + res = super(mail_message, self)._message_read_dict(cr, uid, message, parent_id, context) + res['is_moved'] = bool(message.moved_by_user_id) + return res diff --git a/static/src/css/mail_move_message.css b/static/src/css/mail_move_message.css index e69de29..44fade9 100644 --- a/static/src/css/mail_move_message.css +++ b/static/src/css/mail_move_message.css @@ -0,0 +1,9 @@ +.openerp .oe_mail .oe_msg .oe_msg_icons .oe_move.oe_moved a { + color: #ffefe; + text-shadow: 0px 1px #961b1b,0px -1px #961b1b, -1px 0px #961b1b, 1px 0px #961b1b, 0px 3px 3px rgba(0,0,0,0.1); +} + +.openerp .oe_mail .oe_msg .oe_msg_icons .oe_move:hover a { + color: #ffa1a1; + text-shadow: 0px 1px #ff0000,0px -1px #ff0000, -1px 0px #ff0000, 1px 0px #ff0000, 0px 3px 3px rgba(0,0,0,0.1); +} diff --git a/static/src/js/mail_move_message.js b/static/src/js/mail_move_message.js index c44de1c..bc9fcee 100644 --- a/static/src/js/mail_move_message.js +++ b/static/src/js/mail_move_message.js @@ -26,4 +26,11 @@ openerp.mail_move_message = function (session) { this.do_action(action); } }) + + mail.MessageCommon.include({ + init: function (parent, datasets, options) { + this._super(parent, datasets, options); + this.is_moved = datasets.is_moved || false; + } + }) } \ No newline at end of file diff --git a/static/src/xml/mail_move_message_main.xml b/static/src/xml/mail_move_message_main.xml index 4e15559..fce17c6 100644 --- a/static/src/xml/mail_move_message_main.xml +++ b/static/src/xml/mail_move_message_main.xml @@ -1,8 +1,8 @@