Technical mailing list archives

Re: raise a warning on create button

Daniel Reis
- 10/21/2016 04:03:53
Use a "raise Warning" inside an onchange.
This will produce a non blocking warning message. 

I've been using that through Automated Actions. Look for my Odoo Experience talk slides.


No dia 21/10/2016, às 08:52, shabeer m <> escreveu:

from openerp.exceptions import UserError

    def create(self, vals):
        if condition :
            raise UserError('Error message')

On Thu, Oct 20, 2016 at 9:12 PM, Christian Valsecchi <> wrote:

Hi there,

   I’m trying to raise a warning (when a certain condition is not met) after the user press the button “Create” on sale order creation.

Any ideas? I tried the warning, but I keep getting errors.


Thanks a lot for any input


Kind Regards,

Christian Valsecchi
IT Manager & Consultant - Technology
Mobile +31.627565200


Post to:

with regards
Shabeer M
Contact : 94 00 7 44 77 6

Post to: