From bc27b5b1006f1598ec57037a4f72c3b605372f88 Mon Sep 17 00:00:00 2001 From: projectsodoo Date: Thu, 7 Jan 2021 15:10:25 +0530 Subject: [PATCH 1/2] uncommit code --- cor_custom/models/analytic.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cor_custom/models/analytic.py b/cor_custom/models/analytic.py index 4fe75d0..d851d9c 100755 --- a/cor_custom/models/analytic.py +++ b/cor_custom/models/analytic.py @@ -16,7 +16,7 @@ class AccountAnalyticLine(models.Model): end_time = fields.Float(string='End Time', digits=(16, 2)) unit_amount = fields.Float('Duration', default=0.0) - @api.onchange('employee_id') + """@api.onchange('employee_id') def _onchange_employee_id(self): domain = [] if self.employee_id and self.employee_id.user_id: @@ -34,9 +34,9 @@ class AccountAnalyticLine(models.Model): result = { 'domain': {'project_id': domain}, } - return result + return result""" - @api.onchange('project_id') + """@api.onchange('project_id') def _onchange_project_id(self): domain = [] if not self.project_id else [('project_id', '=', self.project_id.id)] manager_id = [] @@ -59,7 +59,7 @@ class AccountAnalyticLine(models.Model): if self.project_id != self.task_id.project_id: # reset task when changing project self.task_id = False - return result + return result""" _sql_constraints = [ ('check_start_time_lower_than_24', 'CHECK(start_time <= 24)', 'You cannot have a start hour greater than 24'), From ba9d6bca168c02bedd31c8109fc3beffb829e89b Mon Sep 17 00:00:00 2001 From: projectsodoo Date: Thu, 7 Jan 2021 15:24:45 +0530 Subject: [PATCH 2/2] method code update --- cor_custom/models/project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cor_custom/models/project.py b/cor_custom/models/project.py index d7f2f10..f6208cd 100755 --- a/cor_custom/models/project.py +++ b/cor_custom/models/project.py @@ -67,7 +67,7 @@ class Project(models.Model): @api.depends('cost', 'expenses_amt', 'budgeted_revenue') - def _compute_consultant_timesheet_hours(self): + def _compute_calc(self): for record in self: consultant_cost = 0.0 hour = 0.0