[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
This commit is contained in:
Jignesh Rathod (Open ERP) 2012-08-22 12:39:28 +05:30
parent 026f765107
commit 4d0937e9a6
1 changed files with 4 additions and 1 deletions

View File

@ -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: