跳至内容
菜单
此问题已终结
1 回复
6084 查看

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!

形象
丢弃
相关帖文 回复 查看 活动
0
6月 16
5314
3
12月 15
1367
0
3月 15
3706
0
2月 19
5533
0
8月 15
3755