Hi,
in my res.partner there are 2 boolean named customer and supplier if i click the Add button of contact before the customer and supplier button filled, i want to show the popup or warning message regarding the boolean in the parent ,
already i have
@api.model
def create(self, vals):
if not (vals.get('customer')==True or vals.get('supplier')==True or self.env.context.get('flag_partner')==1):
raise ValidationError(_("You have to choose a CheckBox Either Customer/Supplier"))
return super(ResPartner, self).create(vals)
warning message in create function but how can i get the warning when i click on the ADD button
thanks in advance