Odoo Help

Welcome!

This community 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.

0

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

By
Sohail
on 6/29/13, 6:02 AM 1,430 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 ?

0
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!

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

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