c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #28908
[Bug 810451] Re: two setLang in the same line in rml -> pdf report
Hello Vinay Rana,
First, the goal is to make a report where everything is in two
languages. The first is the company language and the second is the
partner language. For example (english and german):
Product1/produkt1 1 pce/stück 1 eur
And in the bug description I wanted to show something simple to have in two languages, the "piece".
So, to show that this functioned until now, and now does not, I wrote the steps how to modify the rml file to have the pce in two languages.
As you said the language for the entire document is the partner language. (set in line 143.)
In line 257 (and not 275 as I wrote in bug descr.) we have
<para style="terp_default_Right_9">[[ formatLang(l.quantity)]] [[ (l.uos_id and l.uos_id.name) or '' ]]</para>
This should be modified to this to have "piece" in two language:
<para style="terp_default_Right_9">[[ formatLang(l.quantity)]] [[ (l.uos_id and l.uos_id.name) or '' ]] [[ setLang(company.partner_id.lang) ]] [['/']][[ (l.uos_id and l.uos_id.name) or '' ]] [[ setLang(o.partner_id.lang) ]] </para>
Of course you have to make the steps from 1..3 in bug desc. before you
make the changes in the rml file.
Expected: pce/stück
resulted: pce/pce
I hope this explication helps you, and excuse me if my english is not as
expected.
Thanks,
TArpi
** Description changed:
- Hi all,
+ Hi all,
Sys: OERP 6.0.2. on Ubuntu 10.10
I have the customer invoice report (account_print_invoice.rml) in two languages. I have the following line in the rml file:
[[l.uos_id.name]][['/']][[setLang(o.partner_id.lang)]][[l.uos_id.name]][[setLang(company.partner_id.lang)]]
- and in the pdf I had pce/buc.
+ and in the pdf I had pce/buc.
I upgraded the server to rev. 3462 and now I have the entire line only in one language, the first one.
To reproduce:
- 1. Fresh database
+ 1. Fresh database
2. install a second language (a different as the main company)
3. translate the pce measure unit to that language
- 4. Modify the accpunt>report>account_print_invoice.rml change the line 275 to this :
+ 4. Modify the accpunt>report>account_print_invoice.rml change the line 257 to this :
<para style="terp_default_Right_9">[[ formatLang(l.quantity)]] [[ (l.uos_id and l.uos_id.name) or '' ]] [[ setLang(company.partner_id.lang) ]] [[ (l.uos_id and l.uos_id.name) or '' ]] [[ setLang(o.partner_id.lang) ]] </para>
- 5. Create a draft customer invoice with least one product, with pce measuring unit.
+ 5. Create a draft customer invoice with least one product, with pce measuring unit.
6. Print the invoice.
- Thanks,
+ Thanks,
TArpi
+
+ Corrected: "line 275" to "line 257".
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/810451
Title:
two setLang in the same line in rml -> pdf report
Status in OpenERP Modules (addons):
Incomplete
Bug description:
Hi all,
Sys: OERP 6.0.2. on Ubuntu 10.10
I have the customer invoice report (account_print_invoice.rml) in two languages. I have the following line in the rml file:
[[l.uos_id.name]][['/']][[setLang(o.partner_id.lang)]][[l.uos_id.name]][[setLang(company.partner_id.lang)]]
and in the pdf I had pce/buc.
I upgraded the server to rev. 3462 and now I have the entire line only in one language, the first one.
To reproduce:
1. Fresh database
2. install a second language (a different as the main company)
3. translate the pce measure unit to that language
4. Modify the accpunt>report>account_print_invoice.rml change the line 257 to this :
<para style="terp_default_Right_9">[[ formatLang(l.quantity)]] [[ (l.uos_id and l.uos_id.name) or '' ]] [[ setLang(company.partner_id.lang) ]] [[ (l.uos_id and l.uos_id.name) or '' ]] [[ setLang(o.partner_id.lang) ]] </para>
5. Create a draft customer invoice with least one product, with pce measuring unit.
6. Print the invoice.
Thanks,
TArpi
Corrected: "line 275" to "line 257".
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/810451/+subscriptions
References