I want to display a warning message and then proceed with executing the function
this is override post_action method.
def action_post(self):
...
if total_debit > (line.product_id.product_credit_limit * 0.8):
raise exceptions.ValidationError(_('Credit limit is over 80%'))
# return {
# 'type': 'ir.actions.client',
# 'tag': 'display_notification',
# 'params': {
# 'message': message,
# 'type': 'danger',
# 'sticky': True,
# }
# }
print(' I am Here')
return super(AccountMove, self).action_post()