Odoo Help

Welcome!

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.

0

Translation of custom report to multi-languages in odoo8

By
Rupali Palshikar
on 12/22/15, 1:48 AM 400 views

I have created one custom report in odoo 8.And wish to print report in more than one language (e.g. English & Dutch) on single report.Is it possible with odoo8, if yes please suggest how to achieve. Thanks in advance.

1
Krupesh Laiya
On 12/22/15, 2:16 AM

Yes you can achieve the report in multi-language please refer sale order report

<template id="report_saleorder">

        <t t-call="report.html_container">

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

            <t t-raw="translate_doc(doc_id, doc_model, 'partner_id.lang', 'sale.report_saleorder_document')"/>

    </t>

    </t>

</template> 


You can print report in partner language using template.


Also you can define the po file for the words are used in your report. In Setting->Import/Export->Export Translation where you can export the translation file of your module and put that file into i18n folder. then upgrade the module and load the translation again you will get the translation words from the po file.

Ok.Thank you very much.what if we don't want to set language by partner id and we just want to add options like print -> 1) Report in English 2) Report in Dutch 3) Report in English and Dutch.

Rupali Palshikar
on 12/22/15, 2:28 AM

Can we create single po file in order translate all words in two languages at a time and display them in required sequence. display one section in English and below that display same section in Dutch.

Rupali Palshikar
on 12/22/15, 2:57 AM

Just create two reports one for english and other for dutch and we can not use one po file for the two language because po file identify by it's language code. you must have to create different PO file for different language. thank you.

Krupesh Laiya
on 12/22/15, 3:36 AM

Thanks Krupesh

Rupali Palshikar
on 12/22/15, 4:01 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

1 follower(s)

Stats

Asked: 12/22/15, 1:48 AM
Seen: 400 times
Last updated: 12/22/15, 6:29 AM