Skip to Content
Menu
This question has been flagged
1 Reply
3181 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.

Avatar
Discard
Best Answer

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.

Avatar
Discard
Author

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.

Author

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.

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.

Author

Thanks Krupesh

Related Posts Replies Views Activity
1
Aug 23
12547
1
Aug 23
11053
1
Jul 23
7228
4
Apr 23
8676
2
Feb 23
17598