uncomment onchange method
This commit is contained in:
parent
3962b7046b
commit
4c5a4db70f
|
@ -9,4 +9,4 @@ from . import analytic
|
|||
from . import product
|
||||
from . import hr_employee
|
||||
from . import sale
|
||||
#from . import res_users
|
||||
from . import res_users
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue