我已将Odoo电子邮件模板从英语翻译成西班牙语,意大利语和法语,但无论语言如何,我都需要用西班牙语发送附带的发票。
我该怎么做?
我试过了:
<field name="lang">es_ES</field>
但它也会翻译电子邮件模板。 <t t-raw="translate_doc(doc_id, doc_model, 'es_ES', 'wms_report.report_document')"/>
但它会抛出错误,因为param必须是对象的属性。答案 0 :(得分:1)
You can write this code and change your report template into partner's language.For ex. If your Invoice report partner's language is Spanish then report will print in Spanish lang.
<template id="report_custom_invoice">
<t t-call="report.html_container">
<t t-foreach="docs" t-as="o">
<t t-call="custom_template.report_invoice_custom" t-
lang="o.partner_id.lang"/>
</t>
</t>
</template>