[FIX]: Fix private message partnerid problem and display and when no author
authorAtul Patel (OpenERP) <atp@tinyerp.com>
Tue, 23 Jul 2013 05:55:11 +0000 (11:25 +0530)
committerAtul Patel (OpenERP) <atp@tinyerp.com>
Tue, 23 Jul 2013 05:55:11 +0000 (11:25 +0530)
bzr revid: atp@tinyerp.com-20130723055511-edtutz2au78rcinx

addons/mail/static/src/js/mail.js
addons/mail/static/src/xml/mail.xml

index 5d54a6a..1715b7b 100644 (file)
@@ -1235,6 +1235,7 @@ openerp.mail = function (session) {
             this.last_id = datasets.last_id || false;
             this.parent_id = datasets.parent_id || false;
             this.is_private = datasets.is_private || false;
+            this.is_author = datasets.is_author ||  false,
             this.author_id = datasets.author_id || false;
             this.thread_level = (datasets.thread_level+1) || 0;
             datasets.partner_ids = datasets.partner_ids || [];
index b14b5a5..05a3b61 100644 (file)
                     <t t-if="!widget.parent_thread.parent_message.record_name and !widget.options.view_inbox">Followers of this document</t>
                 </span>
             </t>
-            <t t-if="!widget.is_private and widget.is_author"> and </t>
+            <t t-if="!widget.is_private and !widget.is_author"> and </t>
             <t t-set="inc" t-value="0"/>
             <t t-foreach="widget.partner_ids" t-as="partner">
                 <t t-if="widget.is_private or (widget.is_author and widget.author_id[0] != partner[0])">
                        <t t-set="inc" t-value="inc+1"/>
                 </t>
             </t>
-             <a t-if="widget.author_id and widget.options.show_link and widget.author_id[0]" t-attf-href="#model=res.partner&amp;id=#{widget.author_id[0]}"><t t-if="!widget.is_author" t-raw="widget.author_id[2]"/></a>
+             <a t-if="widget.author_id and widget.options.show_link and widget.author_id[0]" t-attf-href="#model=res.partner&amp;id=#{widget.author_id[0]}"><t t-if="!widget.is_private and !widget.is_author" t-raw="widget.author_id[2]"/></a>
             <t t-if="widget.partner_ids.length > 3">
                 <span class="oe_more">, <a><t t-raw="widget.partner_ids.length - 3"/> others...</a></span>
                 <a class="oe_more_hidden">&lt;&lt;&lt;</a>