Skip to Content
Menu
This question has been flagged
1 Atsakyti
6203 Rodiniai

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 ?

Portretas
Atmesti
Best Answer

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!

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
0
birž. 16
5479
3
gruod. 15
1367
0
kov. 15
3851
0
vas. 19
5647
0
rugp. 15
3874