Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
6104 Widoki

I have an Error message that needs to be displayed in Spanish using internationalization but the internalization does not seem to work for osv.except_osv

raise osv.except_osv(('Warning'), (' First name is Mandatory ') )

How do I solve this issue ?

Awatar
Odrzuć
Najlepsza odpowiedź

It is easy like that...

Import the method: from openerp.tools.translate import _

And use the method to make your python text translateable...

raise osv.except_osv(_('Warning'), _(' First name is Mandatory ') )

That's it!

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
cze 16
5330
3
gru 15
1367
0
mar 15
3722
0
lut 19
5537
0
sie 15
3772