Technical mailing list archives

Re: raise a warning on create button

- 10/21/2016 03:48:48
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