コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
6095 ビュー

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