[FIX]: Fix analytic line shown.

bzr revid: atp@tinyerp.com-20121008154647-bdxw4ajq5hgb7jsk
This commit is contained in:
Atul Patel (OpenERP) 2012-10-08 21:16:47 +05:30
parent f047f4709f
commit 82138688a2
1 changed files with 1 additions and 1 deletions

View File

@ -468,7 +468,7 @@ class hr_timesheet_line(osv.osv):
for ts_line in self.browse(cursor, user, ids, context=context):
sheet_ids = sheet_obj.search(cursor, user,
[('date_to', '>=', ts_line.date), ('date_from', '<=', ts_line.date),
('employee_id.user_id', '=', ts_line.user_id.id)],
('employee_id.user_id', '=', ts_line.sheet_id and ts_line.sheet_id.employee_id.user_id.id)],
context=context)
if sheet_ids:
# [0] because only one sheet possible for an employee between 2 dates