Email template translation Odoo 10

独自空忆成欢 提交于 2020-03-22 10:41:07

问题


I have implemented a custom template in a custom document module which replaces the standard sale order document.

<!--Email template -->
<record id="sale.email_template_edi_sale" model="mail.template">
    <field name="report_template" ref="report_custom_sale_order"/>
</record>

This works fine but now email template is NOT translated into user/partner language (Spanish in this case). Any tip on why this is happening and how to fix it?


回答1:


    <?xml version="1.0"?>
   <t t-name="account.report_invoice">
       <t t-call="report.html_container">
          <t t-foreach="doc_ids" t-as="doc_id">
          <t t-raw="translate_doc(doc_id, doc_model, 'partner_id.lang', 'account.report_invoice_document')"/> </t>         </t>
</t>

You should add "t-raw="translate_doc" line to your Qweb report template!



来源:https://stackoverflow.com/questions/45021439/email-template-translation-odoo-10

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!