From d282df466cec67563467c37155aaaa8effd18597 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Wed, 14 Nov 2012 14:25:17 +0100 Subject: [PATCH] [FIX] mail: do not display record_name when the user is on a document bzr revid: chm@openerp.com-20121114132517-6c5rfiikkuchcmxx --- addons/crm/crm_lead_demo.xml | 4 +++- addons/mail/data/mail_demo.xml | 3 +-- addons/mail/static/src/js/mail.js | 4 +++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/addons/crm/crm_lead_demo.xml b/addons/crm/crm_lead_demo.xml index 7849125282e..ad85636bb6d 100644 --- a/addons/crm/crm_lead_demo.xml +++ b/addons/crm/crm_lead_demo.xml @@ -547,7 +547,9 @@ Andrew Plan to buy a Laptop crm.lead - <![CDATA[Email0 inquiry]]><div><font size="2">Hello,</font></div><div><font size="2"><br></font></div><div><font size="2">I am interested in your company's product and I plan to buy a new laptop having latest technologies and affordable price.</font></div><div><font size="2">Can you please send me product catalogue?</font></div> + +
Hello,

I am interested in your company's product and I plan to buy a new laptop having latest technologies and affordable price.
Can you please send me product catalogue?
+
email diff --git a/addons/mail/data/mail_demo.xml b/addons/mail/data/mail_demo.xml index 4866749cdae..c7891efb51b 100644 --- a/addons/mail/data/mail_demo.xml +++ b/addons/mail/data/mail_demo.xml @@ -1,7 +1,6 @@ - - + diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index 6cd7c576781..66fdf25039d 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -249,7 +249,7 @@ openerp.mail = function (session) { this.format_data(); // record options and data - this.show_record_name = this.record_name && !this.thread_level && this.model != 'res.partner'; + this.show_record_name = this.options.show_record_name && this.record_name && !this.thread_level && this.model != 'res.partner'; this.options.show_read = false; this.options.show_unread = false; if (this.options.show_read_unread_button) { @@ -1517,6 +1517,7 @@ openerp.mail = function (session) { 'display_indented_thread': -1, 'show_reply_button': false, 'show_read_unread_button': false, + 'show_record_name': false, 'show_compact_message': 1, }, this.node.params); @@ -1605,6 +1606,7 @@ openerp.mail = function (session) { 'show_reply_button': true, 'show_read_unread_button': true, 'show_compose_message': true, + 'show_record_name': true, 'show_compact_message': this.action.params.view_mailbox ? false : 1, 'view_inbox': false, }, this.action.params);