From a0a4ec6374663013994c2b50a78aefb61b357069 Mon Sep 17 00:00:00 2001 From: Alexandre Fayolle Date: Wed, 9 Sep 2015 15:37:53 +0200 Subject: [PATCH] [FIX] hr: fix hr.department name_get hr.department name_get would crash when called with a single id. Closes #8459 --- addons/hr/hr.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/hr/hr.py b/addons/hr/hr.py index cbad87a7c03..12b273ef2c5 100644 --- a/addons/hr/hr.py +++ b/addons/hr/hr.py @@ -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: