Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
4 Antwoorden
4129 Weergaven

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 

Avatar
Annuleer

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

Auteur

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?

Beste antwoord
Did you find a solution for translating reports, I have the same problem
Avatar
Annuleer
Auteur Beste antwoord

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?

Avatar
Annuleer

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