diff --git a/mail_archives/__openerp__.py b/mail_archives/__openerp__.py index ff316df..e27a813 100644 --- a/mail_archives/__openerp__.py +++ b/mail_archives/__openerp__.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- { "name": "mail_archives", - "summary": """Create archive channel""", + "summary": """Adds menu to find old messages""", "category": "Discuss", "images": [], "version": "1.0.0", diff --git a/mail_sent/__openerp__.py b/mail_sent/__openerp__.py index aece823..2390dc7 100644 --- a/mail_sent/__openerp__.py +++ b/mail_sent/__openerp__.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- { "name": "Sentbox", - "summary": """Create sent channel""", + "summary": """Quick way to find sent messages""", "category": "Discuss", "images": [], "version": "1.0.3", diff --git a/mail_sent/models.py b/mail_sent/models.py index e7c3995..c6a404a 100644 --- a/mail_sent/models.py +++ b/mail_sent/models.py @@ -19,10 +19,11 @@ class MailMessage(models.Model): @api.multi def message_format(self): message_values = super(MailMessage, self).message_format() - for message in message_values: - for item in self: - if message['id'] == item.id: - message['sent'] = item.sent + message_index = {message['id']: message for message in message_values} + for item in self: + msg = message_index.get(item.id) + if msg: + msg['sent'] = item.sent return message_values diff --git a/mail_sent/static/description/menu.png b/mail_sent/static/description/menu.png index 13faae5..926661c 100644 Binary files a/mail_sent/static/description/menu.png and b/mail_sent/static/description/menu.png differ diff --git a/mail_sent/static/description/messages.png b/mail_sent/static/description/messages.png index 58cfc7e..c1bf159 100644 Binary files a/mail_sent/static/description/messages.png and b/mail_sent/static/description/messages.png differ