[IMP] Chatter: now displays the 'To' that is the notified people of a given message.
bzr revid: tde@openerp.com-20130214085506-5akyw06ho9vq1xd9
This commit is contained in:
parent
b409abe3ad
commit
ecde0aa380
|
@ -301,8 +301,8 @@ class mail_message(osv.Model):
|
|||
for key, message in message_tree.iteritems():
|
||||
if message.author_id:
|
||||
partner_ids |= set([message.author_id.id])
|
||||
if message.partner_ids:
|
||||
partner_ids |= set([partner.id for partner in message.partner_ids])
|
||||
if message.notified_partner_ids:
|
||||
partner_ids |= set([partner.id for partner in message.notified_partner_ids])
|
||||
if message.attachment_ids:
|
||||
attachment_ids |= set([attachment.id for attachment in message.attachment_ids])
|
||||
# Read partners as SUPERUSER -> display the names like classic m2o even if no access
|
||||
|
@ -322,7 +322,7 @@ class mail_message(osv.Model):
|
|||
else:
|
||||
author = (0, message.email_from)
|
||||
partner_ids = []
|
||||
for partner in message.partner_ids:
|
||||
for partner in message.notified_partner_ids:
|
||||
if partner.id in partner_tree:
|
||||
partner_ids.append(partner_tree[partner.id])
|
||||
attachment_ids = []
|
||||
|
|
|
@ -262,6 +262,14 @@ openerp.mail = function (session) {
|
|||
this.author_id.push(_.str.escapeHTML(email[0]), _.str.trim(email[1]), email[2]);
|
||||
}
|
||||
}
|
||||
if (this.partner_ids && this.partner_ids.length > 3) {
|
||||
this.extra_partners_nbr = this.partner_ids.length - 3;
|
||||
this.extra_partners_str = ''
|
||||
var extra_partners = this.partner_ids.slice(3);
|
||||
for (var key in extra_partners) {
|
||||
this.extra_partners_str += extra_partners[key][1];
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
|
|
@ -243,7 +243,22 @@
|
|||
<t t-if="widget.attachment_ids.length > 0">
|
||||
<div class="oe_msg_attachment_list"></div>
|
||||
</t>
|
||||
<a t-if="widget.author_id and widget.options.show_link and widget.author_id[0]" t-attf-href="#model=res.partner&id=#{widget.author_id[0]}"><t t-raw="widget.author_id[2]"/></a>
|
||||
From: <a t-if="widget.author_id and widget.options.show_link and widget.author_id[0]" t-attf-href="#model=res.partner&id=#{widget.author_id[0]}"><t t-raw="widget.author_id[2]"/></a>
|
||||
<span class='oe_subtle'>•</span>
|
||||
To:
|
||||
<t t-if="widget.partner_ids.length == 0">
|
||||
Nobody
|
||||
</t>
|
||||
<t t-foreach="widget.partner_ids.slice(0, 3)" t-as="partner">
|
||||
<span t-attf-class="oe_partner_follower">
|
||||
<a t-if="widget.options.show_link" t-attf-href="#model=res.partner&id=#{partner[0]}"><t t-raw="partner[1]"/></a>
|
||||
<t t-if="!widget.options.show_link" t-raw="partner[1]"/>
|
||||
</span>
|
||||
<t t-if="!partner_last">,</t>
|
||||
</t>
|
||||
<t t-if="widget.partner_ids.length > 3">
|
||||
<span t-att-title="widget.extra_partners_str">and <t t-raw="widget.extra_partners_nbr"/> more</span>
|
||||
</t>
|
||||
<span t-if="widget.author_id and (!widget.options.show_link or !widget.author_id[0])"><t t-raw="widget.author_id[2]"/></span>
|
||||
<span class='oe_subtle'>•</span>
|
||||
<span t-att-title="widget.date"><t t-if="widget.timerelative" t-raw="widget.timerelative"/><t t-if="!widget.timerelative" t-raw="widget.date"/></span>
|
||||
|
|
Loading…
Reference in New Issue