From 4e435d335db70863ec732860f4b5009ed13d5279 Mon Sep 17 00:00:00 2001 From: "Mayur Maheshwari (OpenERP)" Date: Fri, 17 Aug 2012 16:17:02 +0530 Subject: [PATCH] [FIX]hr_timesheet_sheet :fix the issue open timesheet by account from timesheet form view and pass a appropriate ids in name_get lp bug: https://launchpad.net/bugs/1038023 fixed bzr revid: mma@tinyerp.com-20120817104702-qpzqc8w1s9pccr83 --- addons/hr_timesheet_sheet/hr_timesheet_sheet.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py index ca28b5bdb28..b2ef41f3a46 100644 --- a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py +++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py @@ -442,8 +442,10 @@ class hr_timesheet_sheet(osv.osv): return True def name_get(self, cr, uid, ids, context=None): - if not len(ids): + if not ids: return [] + if isinstance(ids, (int)): + ids = [ids] return [(r['id'], r['date_from'] + ' - ' + r['date_to']) \ for r in self.read(cr, uid, ids, ['date_from', 'date_to'], context=context, load='_classic_write')]