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.
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))
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:
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
|Asked: 11/11/15, 4:33 AM|
|Seen: 2006 times|
|Last updated: 11/16/15, 4:39 AM|