如何在 ODOO 10 中停止引发验证错误例如在 project.py 文件中,我想停止引发此验证错误:
@api.constrains('date_start', 'date_end')
def _check_dates(self):
if any(self.filtered(lambda task: task.date_start and task.date_end and task.date_start > task.date_end)):
raise ValidationError(_('Error ! Task starting date must be lower than its ending date.'))