Hello, how can I change an inherited qweb report from Spanish-English to English-Spanish? This report is used in multi-companies, I already tried to translate it through a .po and I already changed the languages in the database to see if it would print the report in English (in this case), but it doesn't work...
How can I do it by code?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Księgowość
- Zapasy
- PoS
- Project
- MRP
To pytanie dostało ostrzeżenie
Hi,
Kindly check the below code for reference.
<template id="report_saleorder">
<t t-call="report.html_container">
<t t-foreach="docs" t-as="doc">
<t t-call="sale.report_saleorder_document" t-lang="doc.partner_id.lang"/>
</t>
</t>
</template>
Here, we are taking the pdf report based on the partner language. For that we are using the ‘t-lang’ . If you are not required to use the partner language or user language. You can create a field for saving the required language value to the model. And mention that corresponding field name on the t-lang attribute of the inherited template.
Hope it helps
Podoba Ci się ta dyskusja? Dołącz do niej!
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj sięPowiązane posty | Odpowiedzi | Widoki | Czynność | |
---|---|---|---|---|
|
1
sie 22
|
4683 | ||
Date with letter in qweb report
Rozwiązane
|
|
1
cze 22
|
3080 | |
|
2
mar 24
|
1523 | ||
|
1
lip 23
|
3106 | ||
|
0
maj 22
|
3212 |