From daedab9435cf680406b61ec378a655f00ac5bf12 Mon Sep 17 00:00:00 2001 From: Pawan Kumar Date: Mon, 4 Jan 2021 12:05:35 +0530 Subject: [PATCH] remove validation --- cor_custom/models/analytic.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cor_custom/models/analytic.py b/cor_custom/models/analytic.py index cb15854..efb1be5 100755 --- a/cor_custom/models/analytic.py +++ b/cor_custom/models/analytic.py @@ -39,14 +39,14 @@ class AccountAnalyticLine(models.Model): def create(self, vals): if vals.get('unit_amount') == 0.0: raise ValidationError(_("Your can not fill 0.0 hour entry")) - if vals.get('employee_id') and vals.get('project_id'): + """if vals.get('employee_id') and vals.get('project_id'): project = self.env['project.project'].search([('id', '=', vals.get('project_id'))]) if project: for rec in project.sale_line_employee_ids: if rec.employee_id.id == vals.get('employee_id'): remain_hour = rec.budgeted_qty - rec.timesheet_hour if vals.get('unit_amount') > remain_hour: - raise ValidationError(_("Your can not fill entry more than Budgeted hours")) + raise ValidationError(_("Your can not fill entry more than Budgeted hours"))""" value = super(AccountAnalyticLine, self).create(vals) return value