Odoo Help


How to convert error message to Spanish when using when using osv.exception ?

on 6/29/13, 6:02 AM 2,044 views

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 ?

Wolfgang Taferner
On 6/29/13, 7:37 AM

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!

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


Asked: 6/29/13, 6:02 AM
Seen: 2044 times
Last updated: 3/16/15, 8:10 AM