Community: Framework mailing list archives

expert-framework@mail.odoo.com

Re: raise a warning on create button

by
shabeer
- 10/21/2016 03:48:48
from openerp.exceptions import UserError




@api.model
    def create(self, vals):
        if condition :
            raise UserError('Error message')
        

On Thu, Oct 20, 2016 at 9:12 PM, Christian Valsecchi <christian.valsecchi@outlook.com> 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

 

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-framework-62
Post to: mailto:expert-framework@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe




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