Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
6082 Lượt xem

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 ?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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!

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 6 16
5309
3
thg 12 15
1367
0
thg 3 15
3706
0
thg 2 19
5533
0
thg 8 15
3755