← Back to team overview

openerp-community team mailing list archive

lp:~openerp-community/openobject-addons/trunk-bug-1121924-bhavesh into lp:openobject-addons

 

Bhavesh Tilvani has proposed merging lp:~openerp-community/openobject-addons/trunk-bug-1121924-bhavesh into lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)
Related bugs:
  Bug #1121924 in OpenERP Addons: "[Usability] : Event group by date not working."
  https://bugs.launchpad.net/openobject-addons/+bug/1121924

For more details, see:
https://code.launchpad.net/~openerp-community/openobject-addons/trunk-bug-1121924-bhavesh/+merge/150956

hello,

event group by date not working.
Remove group by date exception from base calendar.
and make group by date..

Thanks

-- 
https://code.launchpad.net/~openerp-community/openobject-addons/trunk-bug-1121924-bhavesh/+merge/150956
Your team OpenERP Community is subscribed to branch lp:~openerp-community/openobject-addons/trunk-bug-1121924-bhavesh.
=== modified file 'base_calendar/base_calendar.py'
--- base_calendar/base_calendar.py	2013-01-30 15:55:01 +0000
+++ base_calendar/base_calendar.py	2013-02-28 05:46:24 +0000
@@ -1457,16 +1457,10 @@
         if not context:
             context = {}
 
-        if 'date' in groupby:
-            raise osv.except_osv(_('Warning!'), _('Group by date is not supported, use the calendar view instead.'))
         virtual_id = context.get('virtual_id', True)
         context.update({'virtual_id': False})
         res = super(calendar_event, self).read_group(cr, uid, domain, fields, groupby, offset=offset, limit=limit, context=context, orderby=orderby)
         for re in res:
-            #remove the count, since the value is not consistent with the result of the search when expand the group
-            for groupname in groupby:
-                if re.get(groupname + "_count"):
-                    del re[groupname + "_count"]
             re.get('__context', {}).update({'virtual_id' : virtual_id})
         return res