I have a scenario where I am raising exception in some conditions. But I need to make some fields 'Blank' or pass value '0' if the exception occurs.
I am using @api.onchange method and have tried following ways but none of them worked:
1.
self.holiday_status_id = False
raise except_orm('No Joining Date!', 'There is no joining date defined for this employee')
2.
res = {'warning':{'title':_('No Joining Date!'),
'message':_('There is no joining date defined for this employee')},
'value':{'holiday_status_id':False}}
return res
Thanks.