Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
6353 Представления

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 ?

Аватар
Отменить
Лучший ответ

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!

Аватар
Отменить
Related Posts Ответы Просмотры Активность
0
июн. 16
5624
3
дек. 15
1367
0
мар. 15
3964
0
февр. 19
5757
0
авг. 15
4068