[REV] hr_timesheet: revert commit 4e9138f8f9.

No purpose, no explanation, incorrect commit message, no review from
technical and functional team, no task, separate features mixed in same
commit, incorrect code.

As /dev/null and its related POs manage timesheet applicationplease ask us
for guidance and review before committing that kind of commits. Many thanks.
This commit is contained in:
Thibault Delavallée
2018-02-28 14:29:59 +01:00
parent 2d82d3a4b9
commit 768e34756c
+2 -3
View File
@@ -10,7 +10,7 @@ class AccountAnalyticLine(models.Model):
@api.model
def default_get(self, field_list):
result = super(AccountAnalyticLine, self).default_get(field_list)
if not self.env.context.get('default_employee_id') and 'employee_id' in field_list and result.get('user_id'):
if 'employee_id' in field_list and result.get('user_id'):
result['employee_id'] = self.env['hr.employee'].search([('user_id', '=', result['user_id'])], limit=1).id
return result
@@ -22,8 +22,7 @@ class AccountAnalyticLine(models.Model):
@api.onchange('project_id')
def onchange_project_id(self):
if self.project_id and self.project_id != self.task_id.project_id:
self.task_id = False
self.task_id = False
@api.onchange('employee_id')
def _onchange_employee_id(self):