Odoo Help


This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Set two languages in rml report

Tomas Parnarauskas
on 9/3/13, 6:32 AM 1,999 views

Is it possible to specify language for every field? For example report would be multilanguage, so same field would need to be translated in two languages in same report. Report is divided in two parts, first part is one language and the second part is another language. So fields in both parts are the same, but they need to be translated in different language


Olivier Dony (odo)

--Olivier Dony (odo)--
| 7 6 7
--Olivier Dony (odo)--


Olivier Dony (odo)
On 9/3/13, 10:36 AM

Theoretically you should be able to call setLang() twice in the same report, keeping in mind that the effect will last only until the next call. This is how it works if you print multiple invoices at once: each invoice will have a setLang() call at the beginning, so it will be printed in the relevant Partner language.
You could do the same thing if you can cleanly split your report file in 2 sections and put a setLang() call before each section.

Yeah it works with invoices. For some reason for templates that first use odt document to generate report, this feature is out of the place - one language overrides the other.

NOD Baltic, UAB, Tomas Parnarauskas
on 9/4/13, 3:50 AM

The problem seems to be that template is divided into two columns - left an right. Then when I use setLang() function it set's language for god knows which part of text. I can't figure out then where to put setLang() to change language where I want, because if thinking that setLang() would change language for text bellow, it does not work like that. For example using setLang() below some text, it changes language for every text, even above. setting language in another column, it changes language two few paragraps...

NOD Baltic, UAB, Tomas Parnarauskas
on 9/4/13, 4:27 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)


Asked: 9/3/13, 6:32 AM
Seen: 1999 times
Last updated: 3/16/15, 8:10 AM