Odoo Help


How can I make a Popup Warning Message

on 11/11/15, 4:33 AM 3,156 views

I wanna make a message that says something. I tryed it with raise osv.except_osv

but this is a Error Message.

I want to print a message and that the input is not saved. 


Drees Far

--Drees Far--
Drees Far
| 5 2 6
Tunis, Tunisia
--Drees Far--
Drees Far
On 11/16/15, 4:39 AM

Hello friend;

here is how you can print a warning message.

First, you should import:

from openerp.osv.orm import except_orm

And then in your python:

My_error_Msg = 'hello!!'

raise osv.except_osv(_("Error!"), _(My_error_Msg))

return True

So that, there are two possibilities:

- if you want to block the access and the record (return True)

-Only print the warning message, press ok and save the record (return False)

Some useful links:





Best Regards.

Mayank Gosai
On 11/16/15, 2:23 AM

Hello wizards,

You can use "raise Warning" instead of "raise osv.except_osv".

Thank you.

On 11/12/15, 2:08 AM

you can raise a warning message in on_change by

return {

    'warning': {

        'title': 'Warning!',

        'message': 'The warning text'}


and this question is already in community hear

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

1 follower(s)


Asked: 11/11/15, 4:33 AM
Seen: 3156 times
Last updated: 11/16/15, 4:39 AM