[FIX] mail: do not display record_name when the user is on a document

bzr revid: chm@openerp.com-20121114132517-6c5rfiikkuchcmxx
This commit is contained in:
Christophe Matthieu 2012-11-14 14:25:17 +01:00
parent a43662d125
commit d282df466c
3 changed files with 7 additions and 4 deletions

View File

@ -547,7 +547,9 @@ Andrew</field>
<field name="subject">Plan to buy a Laptop</field>
<field name="model">crm.lead</field>
<field name="res_id" ref="crm_case_15"/>
<field name="body">&lt;![CDATA[Email0 inquiry]]&gt;&lt;div&gt;&lt;font size="2"&gt;Hello,&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font size="2"&gt;&lt;br&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font size="2"&gt;I am interested in your company's product and I plan to buy a new laptop having latest technologies and affordable price.&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font size="2"&gt;Can you please send me product catalogue?&lt;/font&gt;&lt;/div&gt;</field>
<field name="body"><![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>
</field>
<field name="type">email</field>
</record>
<record id="message_note0" model="mail.message">

View File

@ -1,7 +1,6 @@
<?xml version="1.0"?>
<openerp>
<!-- <data noupdate="1"> -->
<data>
<data noupdate="1">
<!-- Update demo user and Agrolait to avoid mail bombing -->
<record id="base.partner_demo" model="res.partner">

View File

@ -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);