[MERGE] hr_timesheet_sheet: Guard for the ids field in the name_get of hr_timesheet_sheet.sheet
bzr revid: stw@openerp.com-20120904140821-0wv40xdhu57sgnis
This commit is contained in:
@@ -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')]
|
||||
|
||||
Reference in New Issue
Block a user