Multilanguage
2 posts • Page 1 of 1
Multilanguagehey there !
sorry for beeing stupid, but i think i got a knot in my brain today ..... I tried out some codes to get an idea how things work in a new Document i setLang(o.partner_ID lang or "de_DE") _(get_label(objects, "amount_untaxed")) --> its not translating _("amount_untaxed") --> not translating _("Invoice Number") --> not translating... in openerp in the translations i do have German and English and i made shure that keywords are exactly the same i used in my code, i also tried other fields .... next i tried to get the name of my report type for example "Invoice Draft" or "Invoice Number" or whatever it is called depending of the state its in.... get_label(o,"name") --> ist not getting anything i mean its getting "description" but that is what at the field "string" is written in ... so its clear to me but how do i get the name infront of the "invoice number" get_label(o,"number") --> ist not getting anything get_label(o,"state") --> ist not getting anything then i checked the fields in view fields and found that for example number has no 'string' so i do unerstand why i do not get anything back when i use "number".... but it seems i really did not understand HOW it works .... i checked in extra_funktions.py how get_label works at found as already mentioned the 'string' field which is read out... but i do not get the name infront of my invoice number thanks in advance for a hint where my knot is
Re: Multilanguageok
what i have found out till now... it seems there are areas where the setLang is not valid.... So if i do a Global setLang at the beginning of my Document (HEADER), it is not translating for example in the next Frame, also not in a table aso... So i tried to set it right infront where i would need it and it always works. still testing if there are other things to take care one very strange thing was that i setLang right in front my next inputfield.... but it did not translate it, i just wanted to make sure so i read out the Lang getLang() immediately after the setLang and it shows de_DE and suddenly it translated .... is there some kind of caching possible somewhere ? after i deleted the getLang it still translated, so this was definitly not to understand for me
2 posts • Page 1 of 1
|
Copyright © 2001 Alistek Ltd., ALL RIGHTS RESERVED

