Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
6106 Vues

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
Ignorer
Meilleure réponse

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
Ignorer
Publications associées Réponses Vues Activité
0
juin 16
5332
3
déc. 15
1367
0
mars 15
3722
0
févr. 19
5537
0
août 15
3775