为什么我的自定义邮件更改不显示?



我找到了我想要自定义的邮件模板,但是正文的变化不起作用,没有明显的变化我的XML文件是这个

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<record id="sale.email_template_edi_sale" model="mail.template">
<field name="name">Sales Order: Send by email</field>
<field name="model_id" ref="sale.model_sale_order" />
<field name="email_from">${object.user_id.email_formatted |safe}</field>
<field name="partner_to">${object.partner_id.id}</field>
<field name="subject">${object.company_id.as_comercial} ${object.state in ('draft', 'sent') and 'Quotation' or
'Order'} (Ref ${object.name or 'n/a' })</field>
<field name="body_html" type="html">
<div style="margin: 0px; padding: 0px;">
<p style="margin: 0px; padding: 0px; font-size: 13px;">
Hello ${object.partner_id.name} this is a message from ODOO

</p>
</div>
</field>
<field name="report_template" ref="action_report_saleorder" />
<field name="report_name">${(object.name or '').replace('/','_')}</field>
<field name="lang">${object.partner_id.lang}</field>
<field name="user_signature" eval="False" />
<field name="auto_delete" eval="True" />
</record>
</data>
</odoo>

你不能这样自定义更新模板。试试这个。

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<function name="write" model="ir.model.data">
<function name="search" model="ir.model.data">
<value eval="[('module', '=', 'sale'), ('name', '=', 'email_template_edi_sale')]" />
</function>
<value eval ="{'noupdate': False}" />
</function>
<record id="sale.email_template_edi_sale" model="mail.template">
<field name="name">Sales Order: Send by email</field>
<field name="model_id" ref="sale.model_sale_order" />
<field name="email_from">${object.user_id.email_formatted |safe}</field>
<field name="partner_to">${object.partner_id.id}</field>
<field name="subject">${object.company_id.as_comercial} ${object.state in ('draft',     'sent') and 'Quotation' or
'Order'} (Ref ${object.name or 'n/a' })</field>
<field name="body_html" type="html">
<div style="margin: 0px; padding: 0px;">
<p style="margin: 0px; padding: 0px; font-size: 13px;">
Hello ${object.partner_id.name} this is a message from ODOO

</p>
</div>
</field>
<field name="report_template" ref="action_report_saleorder" />
<field name="report_name">${(object.name or '').replace('/','_')}</field>
<field name="lang">${object.partner_id.lang}</field>
<field name="user_signature" eval="False" />
<field name="auto_delete" eval="True" />
</record>
<function name="write" model="ir.model.data">
<function name="search" model="ir.model.data">
<value eval="[('module', '=', 'sale'), ('name', '=', 'email_template_edi_sale')]" />
</function>
<value eval ="{'noupdate': True}" />
</function>
</data>
</odoo>

相关内容

  • 没有找到相关文章

最新更新