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/__init__.py b/cor_custom/models/__init__.py index fc17eb2..6b52d03 100755 --- a/cor_custom/models/__init__.py +++ b/cor_custom/models/__init__.py @@ -9,4 +9,4 @@ from . import analytic from . import product from . import hr_employee from . import sale -#from . import res_users \ No newline at end of file +from . import res_users \ No newline at end of file diff --git a/cor_custom/models/analytic.py b/cor_custom/models/analytic.py index 2d8dbed..46c7a62 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.update_timesheet == 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