Odoo Help


Javascript warning message

Marek Jan-Alexander
on 3/29/15, 1:27 PM 1,709 views

Hi community,

is there a (simple) way to raise a javacript warning message on onchange event.? Basically the same which is already raised when a mandatory field is not filled. Is there any existing module where this function works?

Thanks for help!

Marek Jan-Alexander
On 3/31/15, 1:27 PM

Thanks, Jérémy, for your answer but this is actually not what i meant. I would like to raise a message in the right corner, precisely in the same way as the message that popups when mandatory field is not filled. 


Jérémy Kersten (jke)

--Jérémy Kersten (jke)--

| 3 3 5
Jodoigne, Belgium
--Jérémy Kersten (jke)--

Jérémy is a member of the core R&D team since september 2013. He developed several projects for OpenERP version 8 including the eCommerce, the Google Calendar synchronization and the new product variants/configurator. Now, he manages Odoo website and themes for saas.

Jérémy Kersten (jke)
On 3/29/15, 2:46 PM

In a on change, you can raise a warning or/and values...

        return {
'warning': {
'title': _('Title'),
'message': _('Your message'),
'value': values,

From doc: 

Be careful not to use @api.one in that case as it will mangle the dictionary (put it in a list, which is not supported by the web client).

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

2 follower(s)


Asked: 3/29/15, 1:27 PM
Seen: 1709 times
Last updated: 3/31/15, 1:27 PM