From 4d0937e9a642b31183dfbc0cd963b95411d536cb Mon Sep 17 00:00:00 2001 From: "Jignesh Rathod (Open ERP)" Date: Wed, 22 Aug 2012 12:39:28 +0530 Subject: [PATCH] [FIX] Fixes the problem of Iteration is not allowed on browse_record lp bug: https://launchpad.net/bugs/1039899 fixed bzr revid: jir@tinyerp.com-20120822070928-hfqz8s9du89ib03d --- addons/event/event.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/event/event.py b/addons/event/event.py index 7f0c77661e4..004b370f48e 100644 --- a/addons/event/event.py +++ b/addons/event/event.py @@ -52,10 +52,13 @@ class event_event(osv.osv): _inherit = ['ir.needaction_mixin','mail.thread'] def name_get(self, cr, uid, ids, context=None): + event_obj = self.browse(cr, uid, ids, context=context) if not ids: return [] + if not isinstance(event_obj,list): + event_obj = [event_obj] res = [] - for record in self.browse(cr, uid, ids, context=context): + for record in event_obj: date = record.date_begin.split(" ")[0] date_end = record.date_end.split(" ")[0] if date != date_end: