Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
6049 Vistas

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
Descartar
Mejor respuesta

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
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
0
jun 16
5287
3
dic 15
1367
0
mar 15
3690
0
feb 19
5501
0
ago 15
3727