From be776fd047ae5e0e9d0a0a51f0ce22cd2dab0fa1 Mon Sep 17 00:00:00 2001 From: "pawan.sharma" Date: Wed, 22 Jun 2022 10:14:03 +0530 Subject: [PATCH] remove total 100% validation --- cor_custom/models/project.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/cor_custom/models/project.py b/cor_custom/models/project.py index 0b3d597..9e9eb42 100755 --- a/cor_custom/models/project.py +++ b/cor_custom/models/project.py @@ -200,14 +200,14 @@ class Project(models.Model): for rec in self.sale_line_employee_ids: if rec.distribution_per > 100: raise ValidationError(_("Percentage should be less than or equal to 100")) - if rec.role == 'Manager': + """if rec.role == 'Manager': manager_total = manager_total + rec.distribution_per if manager_total > 100: raise ValidationError(_("Manager Distribution Percentage should be less than or equal to 100")) else: employee_total = employee_total + rec.distribution_per if employee_total > 100: - raise ValidationError(_("Employee Distribution Percentage should be less than or equal to 100")) + raise ValidationError(_("Employee Distribution Percentage should be less than or equal to 100"))""" @api.onchange('budgeted_revenue', 'expenses_per') @@ -350,15 +350,11 @@ class InheritProjectProductEmployeeMap(models.Model): def _compute_total_cost(self): for val in self: if val.project_id.project_type == 'hours_in_consultant': - print('111111111111') if val.hour_distribution == 'Percentage': - print('22222222222222') if val.role == 'Manager': - print('3333333333') val.cost = val.project_id.budgeted_revenue * (val.project_id.manager_per / 100) * ( val.distribution_per / 100) else: - print('44444444444444') val.cost = val.project_id.budgeted_revenue * (val.project_id.employee_per / 100) * ( val.distribution_per / 100) if val.price_unit > 0.0: