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

[SOLVED] how to get correct lang of the report which is bind to "res.partner"

By
Fanha Giang
on 2/29/16, 9:09 PM 323 views

hi all, I'm making a report which is bind to "res.partner" like below. I try to get the 'lang' but it is not work.

<report id="action_report_partner_congno" model="res.partner" string="Aging Statement" report_type="qweb-html" name="account.report_partnercongno" file="account.report_partnercongno" menu="False"/>


<template id="account.report_partnercongno" customize_show="True">

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

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

<t t-raw="translate_doc(doc_id, doc_model, 'lang', 'account.report_partnercongno_document')"/>

</t>

</t>

</template>

2
Jaydeep Barot (jar)
On 3/1/16, 4:10 AM

Hello Fanha,
Use below this code to print report (lang of partner)

<report id="action_report_partner_congno" model="res.partner" string="Aging Statement" report_type="qweb-html" name="account.report_partnercongno" file="account.report_partnercongno"/>


<t t-raw="translate_doc(doc_id, doc_model, 'commercial_partner_id.lang', 'account.report_partnercongno_document')"/> 

thx, it work! :)

Fanha Giang
on 3/1/16, 5:04 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: 2/29/16, 9:09 PM
Seen: 323 times
Last updated: 3/29/16, 10:55 AM