[FIX] mail: partner avatar is email_icon when there are no partner or partner_id is null
bzr revid: chm@openerp.com-20121112152753-houzjde3x8jfwtks
This commit is contained in:
parent
65e46e1826
commit
99525e3a54
|
@ -87,6 +87,7 @@ This month you also get 250 EUR of eco-vouchers if you have been in the company
|
|||
<!-- External mail + reply with attachment conversation -->
|
||||
<record id="message_video2" model="mail.message">
|
||||
<field name="subject">Plan to install OpenERP</field>
|
||||
<field name="model">mail.message</field>
|
||||
<field name="body">
|
||||
<![CDATA[Email0 inquiry]]>
|
||||
<div><font size="2">Hello,</font></div><div><font size="2"><br></font></div>
|
||||
|
@ -95,7 +96,6 @@ This month you also get 250 EUR of eco-vouchers if you have been in the company
|
|||
Sophie
|
||||
</field>
|
||||
<field name="type">email</field>
|
||||
<field name="subtype_id" ref="mt_comment"/>
|
||||
<field name="author_id" ref="base.res_partner_2"/>
|
||||
<field name="partner_ids" eval="[(6, 0, [ref('base.partner_demo'), ref('base.partner_root')])]"/>
|
||||
</record>
|
||||
|
@ -106,7 +106,7 @@ This month you also get 250 EUR of eco-vouchers if you have been in the company
|
|||
<field name="name">catalogue 2012.pdf</field>
|
||||
</record>
|
||||
<record id="message_video2_message1" model="mail.message">
|
||||
<field name="subject">Re: Plan to buy a Laptop</field>
|
||||
<field name="subject">Re: Plan to install OpenERP</field>
|
||||
<field name="body">
|
||||
Dear Customer,<br/>
|
||||
Thanks for showing interest in our products.<br/>
|
||||
|
|
|
@ -274,7 +274,7 @@ openerp.mail = function (session) {
|
|||
this.date = session.web.format_value(this._date, {type:"datetime"});
|
||||
this.timerelative = $.timeago(this.date);
|
||||
}
|
||||
if (this.type == 'email' && !this.author_id) {
|
||||
if (this.type == 'email' && (!this.author_id || !this.author_id[0])) {
|
||||
this.avatar = ('/mail/static/src/img/email_icon.png');
|
||||
} else if (this.author_id && this.template != 'mail.compose_message') {
|
||||
this.avatar = mail.ChatterUtils.get_image(this.session, 'res.partner', 'image_small', this.author_id[0]);
|
||||
|
|
Loading…
Reference in New Issue