跳至内容
菜单
此问题已终结
4 回复
4136 查看

I am trying to setup odoo for my company. 

We need to have pdf for quotation, sales order, purchase order etc based on customer's language setting.

I have set the language reference fore each customer, however, the reports remain not translated at all.

I have checked the translations through developer tool "translations" -> "translation terms" but I could not find any untranslated terms related to the report. 

For example, I check the term "terms and conditions" (which is in the pdf file), but I see them all translated already. I am not sure if I am looking into this issue in the right direction. 

Is there anything else I should check or setup?


Thank you 

形象
丢弃

if you set customers language, the sale order, purchase order will print in the language that we set in the customer master, you can see a showcase here: https://www.youtube.com/watch?v=qSsJGCI73lI&vl=en

编写者

Hi Niyas,

Thank you for your answer.

I follow the steps exactly the same as in the video, but my pdf is still not translated.

Do you know what might go wrong?

最佳答案
Did you find a solution for translating reports, I have the same problem
形象
丢弃
编写者 最佳答案

Hi Niyas, 

Thank you for your answer.

I follow the steps exactly the same as in the video, but my pdf is still not translated.

Do you know what might go wrong?

形象
丢弃

Hi Yu-Ming,

Odoo has changed the method of translating the PDF reports.

Replace :

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

By :

<t t-foreach="doc_ids" t-as="doc_id">

<t t-call="'account.report_invoice_document" t-lang="doc_id.partner_id.lang"/>µ

</t>

https://github.com/odoo/odoo/commit/09affe7cdf8da1ba4098d1eb6967afaca98cd4db