diff --git a/addons/event/event.py b/addons/event/event.py index 7f0c77661e4..d548b199ce0 100644 --- a/addons/event/event.py +++ b/addons/event/event.py @@ -39,8 +39,8 @@ class event_type(osv.osv): } _defaults = { 'default_registration_min': 0, - 'default_registration_max':0, - } + 'default_registration_max': 0, + } event_type() @@ -54,8 +54,12 @@ class event_event(osv.osv): def name_get(self, cr, uid, ids, context=None): if not ids: return [] + + if isinstance(ids, (long, int)): + ids = [ids] + res = [] - for record in self.browse(cr, uid, ids, context=context): + for record in self.browse(cr, uid, ids, context=context) date = record.date_begin.split(" ")[0] date_end = record.date_end.split(" ")[0] if date != date_end: