[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
This commit is contained in:
Mayur Maheshwari (OpenERP) 2012-08-17 16:17:02 +05:30
parent 6666d5993f
commit 4e435d335d
1 changed files with 3 additions and 1 deletions

View File

@ -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')]