The best thing that you can do is the same behaviour as with a quotation / sale order. The language of the report there is based on the language from the customer filled in on the quotation. When you create a many2one to the res.partner you know for which customer the report is. Thanks to this many2one you would know the language from the partner and from there on you can translate the report. Have a look at the default quotation / sale order report and handling languages:
<t t-foreach="docs" t-as="doc">
<t t-call="sale.report_saleorder_document" t-lang="doc.partner_id.lang"/>
This bit of the code will get the language from the partner and will translate the report to the correct language. Do note: in order for this to work you also need to have translations in your .po files ofcourse!
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
|Asked: 10/30/15, 11:25 AM|
|Seen: 305 times|
|Last updated: 10/30/15, 11:49 AM|