In qweb reports, the address is displayed according the standards of the country where it belongs. In the email templates, the company address was always displayed in the same way, no matter the country of the address.
133 lines
6.5 KiB
XML
133 lines
6.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
|
|
<data noupdate="1">
|
|
<!--Email template -->
|
|
<record id="email_template_edi_purchase" model="mail.template">
|
|
<field name="name">RFQ - Send by Email</field>
|
|
<field name="email_from">${(object.create_uid.email or '')|safe}</field>
|
|
<field name="subject">${object.company_id.name|safe} Order (Ref ${object.name or 'n/a' })</field>
|
|
<field name="partner_to">${object.partner_id.id}</field>
|
|
<field name="model_id" ref="purchase.model_purchase_order"/>
|
|
<field name="auto_delete" eval="True"/>
|
|
<field name="report_template" ref="report_purchase_quotation"/>
|
|
<field name="report_name">RFQ_${(object.name or '').replace('/','_')}</field>
|
|
<field name="lang">${object.partner_id.lang}</field>
|
|
<field name="body_html"><![CDATA[
|
|
<div style="font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; ">
|
|
|
|
<p>Hello ${object.partner_id.name},</p>
|
|
|
|
<p>Here is a ${object.state in ('draft', 'sent') and 'request for quotation' or 'purchase order confirmation'} from ${object.company_id.name}: </p>
|
|
|
|
<p style="border-left: 1px solid #8e0000; margin-left: 30px;">
|
|
<strong>REFERENCES</strong><br />
|
|
RFQ number: <strong>${object.name}</strong><br />
|
|
RFQ date: ${object.date_order}<br />
|
|
% if object.origin:
|
|
RFQ reference: ${object.origin}<br />
|
|
% endif
|
|
% if object.partner_ref:
|
|
Your reference: ${object.partner_ref}<br />
|
|
% endif
|
|
% if object.create_uid:
|
|
Your contact: <a href="mailto:${object.create_uid.email or ''}?subject=Order%20${object.name}">${object.create_uid.name}</a>
|
|
% endif
|
|
</p>
|
|
|
|
<br/>
|
|
<p>If you have any question, do not hesitate to contact us.</p>
|
|
<p>Thank you!</p>
|
|
<br/>
|
|
<br/>
|
|
<div style="width: 375px; margin: 0px; padding: 0px; background-color: #8E0000; border-top-left-radius: 5px 5px; border-top-right-radius: 5px 5px; background-repeat: repeat no-repeat;">
|
|
<h3 style="margin: 0px; padding: 2px 14px; font-size: 12px; color: #DDD;">
|
|
<strong style="text-transform:uppercase;">${object.company_id.name}</strong></h3>
|
|
</div>
|
|
<div style="width: 347px; margin: 0px; padding: 5px 14px; line-height: 16px; background-color: #F2F2F2;">
|
|
<span style="color: #222; margin-bottom: 5px; display: block; ">
|
|
${object.company_id.partner_id.sudo().with_context(show_address=True, html_format=True).name_get()[0][1] | safe}
|
|
</span>
|
|
% if object.company_id.phone:
|
|
<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">
|
|
Phone: ${object.company_id.phone}
|
|
</div>
|
|
% endif
|
|
% if object.company_id.website:
|
|
<div>
|
|
Web : <a href="${object.company_id.website}">${object.company_id.website}</a>
|
|
</div>
|
|
%endif
|
|
<p></p>
|
|
</div>
|
|
</div>
|
|
]]></field>
|
|
</record>
|
|
|
|
|
|
<!--Email template -->
|
|
<record id="email_template_edi_purchase_done" model="mail.template">
|
|
<field name="name">Purchase Order - Send by Email</field>
|
|
<field name="email_from">${object.create_uid.email or ''}</field>
|
|
<field name="subject">${object.company_id.name} Order (Ref ${object.name or 'n/a' })</field>
|
|
<field name="partner_to">${object.partner_id.id}</field>
|
|
<field name="model_id" ref="purchase.model_purchase_order"/>
|
|
<field name="auto_delete" eval="True"/>
|
|
<field name="report_template" ref="action_report_purchase_order"/>
|
|
<field name="report_name">PO_${(object.name or '').replace('/','_')}</field>
|
|
<field name="lang">${object.partner_id.lang}</field>
|
|
<field name="body_html"><![CDATA[
|
|
<div style="font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; ">
|
|
|
|
<p>Hello ${object.partner_id.name},</p>
|
|
|
|
<p>Here is a ${object.state in ('draft', 'sent') and 'request for quotation' or 'purchase order confirmation'} from ${object.company_id.name}: </p>
|
|
|
|
<p style="border-left: 1px solid #8e0000; margin-left: 30px;">
|
|
<strong>REFERENCES</strong><br />
|
|
Order number: <strong>${object.name}</strong><br />
|
|
Order total: <strong>${object.amount_total} ${object.currency_id.name}</strong><br />
|
|
Order date: ${object.date_order}<br />
|
|
% if object.origin:
|
|
Order reference: ${object.origin}<br />
|
|
% endif
|
|
% if object.partner_ref:
|
|
Your reference: ${object.partner_ref}<br />
|
|
% endif
|
|
% if object.create_uid:
|
|
Your contact: <a href="mailto:${object.create_uid.email or ''}?subject=Order%20${object.name}">${object.create_uid.name}</a>
|
|
% endif
|
|
</p>
|
|
|
|
<br/>
|
|
<p>If you have any question, do not hesitate to contact us.</p>
|
|
<p>Thank you!</p>
|
|
<br/>
|
|
<br/>
|
|
<div style="width: 375px; margin: 0px; padding: 0px; background-color: #8E0000; border-top-left-radius: 5px 5px; border-top-right-radius: 5px 5px; background-repeat: repeat no-repeat;">
|
|
<h3 style="margin: 0px; padding: 2px 14px; font-size: 12px; color: #DDD;">
|
|
<strong style="text-transform:uppercase;">${object.company_id.name}</strong></h3>
|
|
</div>
|
|
<div style="width: 347px; margin: 0px; padding: 5px 14px; line-height: 16px; background-color: #F2F2F2;">
|
|
<span style="color: #222; margin-bottom: 5px; display: block; ">
|
|
${object.company_id.partner_id.sudo().with_context(show_address=True, html_format=True).name_get()[0][1] | safe}
|
|
</span>
|
|
% if object.company_id.phone:
|
|
<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">
|
|
Phone: ${object.company_id.phone}
|
|
</div>
|
|
% endif
|
|
% if object.company_id.website:
|
|
<div>
|
|
Web : <a href="${object.company_id.website}">${object.company_id.website}</a>
|
|
</div>
|
|
%endif
|
|
<p></p>
|
|
</div>
|
|
</div>
|
|
]]></field>
|
|
</record>
|
|
|
|
</data>
|
|
</odoo>
|