From dd8d3378f00cd35930ffca2fc02385f0071e8711 Mon Sep 17 00:00:00 2001 From: "pawan.sharma" Date: Thu, 9 Dec 2021 17:34:17 +0530 Subject: [PATCH] comment onchange method code --- cor_custom/__manifest__.py | 2 +- cor_custom/models/analytic.py | 16 ++++++++-------- cor_custom/models/res_users.py | 2 +- cor_custom/views/res_users.xml | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/cor_custom/__manifest__.py b/cor_custom/__manifest__.py index 3a03896..8f05dd5 100755 --- a/cor_custom/__manifest__.py +++ b/cor_custom/__manifest__.py @@ -31,7 +31,7 @@ 'views/project_view.xml', #'views/project_hours_view.xml', 'views/hr_employee_views.xml', - #'views/res_users.xml', + 'views/res_users.xml', 'views/hr_timesheet_templates.xml', 'views/analytic_view.xml', 'views/hide_menus.xml', diff --git a/cor_custom/models/analytic.py b/cor_custom/models/analytic.py index e33be56..2d8dbed 100755 --- a/cor_custom/models/analytic.py +++ b/cor_custom/models/analytic.py @@ -140,14 +140,14 @@ class AccountAnalyticLine(models.Model): user_ids = self.env['hr.employee'].search( [('user_id', 'in', self.project_id.allowed_internal_user_ids.ids)]).ids project_all_emp_ids = cuser + manager_id + user_ids + consul_project_ids - if self.env.user.timesheet_create == True: - result = { - 'domain': {'task_id': domain}, - } - else: - result = { - 'domain': {'task_id': domain, 'employee_id': [('id', 'in', project_all_emp_ids)]}, - } + # if self.env.user.update_timesheet == True: + # result = { + # 'domain': {'task_id': domain}, + # } + # else: + # result = { + # 'domain': {'task_id': domain, 'employee_id': [('id', 'in', project_all_emp_ids)]}, + # } if self.project_id != self.task_id.project_id: # reset task when changing project self.task_id = False diff --git a/cor_custom/models/res_users.py b/cor_custom/models/res_users.py index 3402b4c..2442fba 100755 --- a/cor_custom/models/res_users.py +++ b/cor_custom/models/res_users.py @@ -6,6 +6,6 @@ class CorResUsers(models.Model): _inherit = "res.users" _description = "Custom Res Users" - timesheet_create = fields.Boolean() + update_timesheet = fields.Boolean() diff --git a/cor_custom/views/res_users.xml b/cor_custom/views/res_users.xml index bb8727d..aabd224 100755 --- a/cor_custom/views/res_users.xml +++ b/cor_custom/views/res_users.xml @@ -9,7 +9,7 @@ - +