电子邮件模板翻译Odoo 10 [英] Email template translation Odoo 10

查看:142
本文介绍了电子邮件模板翻译Odoo 10的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在自定义文档模块中实现了自定义模板,该模块取代了标准的销售订单文档.

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?

推荐答案

    <?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>

您应该在Qweb报告模板中添加"t-raw ="translate_doc"行!

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

这篇关于电子邮件模板翻译Odoo 10的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆