Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
6066 Visualizzazioni

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 ?

Avatar
Abbandona
Risposta migliore

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!

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
0
giu 16
5307
3
dic 15
1367
0
mar 15
3702
0
feb 19
5519
0
ago 15
3749