From f935c9e4823ddf126369359b4eb720bac5505df7 Mon Sep 17 00:00:00 2001 From: "Atul Patel (OpenERP)" Date: Wed, 10 Oct 2012 18:17:16 +0530 Subject: [PATCH] [FIX]: get sheet id using timesheet line user id bzr revid: atp@tinyerp.com-20121010124716-hdaebwpsowpowhl7 --- addons/hr_timesheet_sheet/hr_timesheet_sheet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py index 0fb98e142ec..32fbf978175 100644 --- a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py +++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py @@ -322,7 +322,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.sheet_id and ts_line.sheet_id.employee_id.user_id.id)], + ('employee_id.user_id', '=', ts_line.user_id.id)], context=context) if sheet_ids: # [0] because only one sheet possible for an employee between 2 dates