[FIX] hr: fix hr.department name_get

hr.department name_get would crash when called with a single id.

Closes #8459
This commit is contained in:
Alexandre Fayolle 2015-09-09 15:37:53 +02:00 committed by Martin Trigaux
parent 1423cef6fc
commit a0a4ec6374
1 changed files with 2 additions and 0 deletions

View File

@ -412,6 +412,8 @@ class hr_department(osv.osv):
context = {}
if not ids:
return []
if isinstance(ids, (int, long)):
ids = [ids]
reads = self.read(cr, uid, ids, ['name','parent_id'], context=context)
res = []
for record in reads: