remove validation
This commit is contained in:
parent
8803e294cf
commit
daedab9435
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue