跳至內容
選單
此問題已被標幟
1 回覆
6096 瀏覽次數

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
5328
3
12月 15
1367
0
3月 15
3710
0
2月 19
5535
0
8月 15
3763