summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorJérome Maes <jem@openerp.com>2017-08-07 16:35:08 +0200
committerJérome Maes <jem@openerp.com>2017-08-10 11:29:36 +0200
commit9b4c8a4e318cdabbd21ebb28c61b17ad02874daa (patch)
tree8cd408ba2fd6c710f89f95f975d11d76cd980d0b /addons
parent3a886327a6d39367d0f75140a0297d66e2e7fb23 (diff)
[IMP] hr_timesheet: default employee
'default_get' should return a value for employee when asked, even if it is not a timesheet.
Diffstat (limited to 'addons')
-rw-r--r--addons/hr_timesheet/hr_timesheet.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/hr_timesheet/hr_timesheet.py b/addons/hr_timesheet/hr_timesheet.py
index d8d07c42fd8..3023fdcea59 100644
--- a/addons/hr_timesheet/hr_timesheet.py
+++ b/addons/hr_timesheet/hr_timesheet.py
@@ -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 'employee_id' in field_list and result.get('user_id') and result.get('project_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