Odoo / Coding / *Error Handling
Error Handling
-
Step 1:
1. import error package
from odoo.exceptions import UserError 2. apply error alert
egraise UserError(_('Please Enter a valid Salary amount')) if self.salary_amount == 0.0: raise UserError(_('Please Enter a valid Salary amount'))