[FIX] purchase: wrong condition in mail template
Before checking the first element of 'partner_id.child_ids', rather check that the partner and not the object has children, to avoid crashes when the partner of the PO is a company. opw-1826359
This commit is contained in:
@@ -15,7 +15,7 @@
|
|||||||
<field name="lang">${object.partner_id.lang}</field>
|
<field name="lang">${object.partner_id.lang}</field>
|
||||||
<field name="body_html"><![CDATA[
|
<field name="body_html"><![CDATA[
|
||||||
<p>Dear
|
<p>Dear
|
||||||
% if object.partner_id.is_company and object.child_ids:
|
% if object.partner_id.is_company and object.partner_id.child_ids:
|
||||||
${object.partner_id.child_ids[0].name}
|
${object.partner_id.child_ids[0].name}
|
||||||
% else :
|
% else :
|
||||||
${object.partner_id.name}
|
${object.partner_id.name}
|
||||||
|
|||||||
Reference in New Issue
Block a user