Show message box in odoo


class ep_sale_print(osv.osv):
_inherit=’sale.order’
_columns={
‘license_key’:fields.char(string=”Licese Key”,size=64),
}

@api.onchange(‘license_key’)
def validate_license_key(self):
if len(self.license_key) > 10:
return {
‘warning’:{
‘title’: “Key Length”,
‘message’: “The length of key is not match”,
},
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s