"""
+ import babel.dates
import calendar
import collections
import copy
dt = datetime.datetime.strptime(alldata[d['id']][groupby][:7], '%Y-%m')
days = calendar.monthrange(dt.year, dt.month)[1]
- d[groupby] = datetime.datetime.strptime(d[groupby][:10], '%Y-%m-%d').strftime('%B %Y')
+ date_value = datetime.datetime.strptime(d[groupby][:10], '%Y-%m-%d')
+ d[groupby] = babel.dates.format_date(
+ date_value, format='MMMM yyyy', locale=context.get('lang', 'en_US'))
d['__domain'] = [(groupby, '>=', alldata[d['id']][groupby] and datetime.datetime.strptime(alldata[d['id']][groupby][:7] + '-01', '%Y-%m-%d').strftime('%Y-%m-%d') or False),\
(groupby, '<=', alldata[d['id']][groupby] and datetime.datetime.strptime(alldata[d['id']][groupby][:7] + '-' + str(days), '%Y-%m-%d').strftime('%Y-%m-%d') or False)] + domain
del alldata[d['id']][groupby]
self.check_access_rights(cr, user, 'read')
if not fields:
fields = list(set(self._columns.keys() + self._inherit_fields.keys()))
+ #remove depricated fields from field list
+ for field in self._columns.keys():
+ if getattr(self._columns[field], 'deprecated'):
+ fields.remove(field)
if isinstance(ids, (int, long)):
select = [ids]
else: