Skip to content
Snippets Groups Projects
Commit 48452212 authored by Géry Debongnie's avatar Géry Debongnie
Browse files

[FIX] fixes the call to read_group to make it use the new way to group dates...

[FIX] fixes the call to read_group to make it use the new way to group dates by interval, instead of using the context (addon mass mailing)

bzr revid: ged@openerp.com-20140122122251-t0yrrjfa6ob5eoj0
parent 2bdf3039
Branches
Tags
No related merge requests found
......@@ -180,18 +180,6 @@ class MassMailing(osv.Model):
results for the next 6 days following the mass mailing date. """
obj = self.pool['mail.mail.statistics']
res = {}
context['datetime_format'] = {
'opened': {
'interval': 'day',
'groupby_format': 'yyyy-mm-dd',
'display_format': 'dd MMMM YYYY'
},
'replied': {
'interval': 'day',
'groupby_format': 'yyyy-mm-dd',
'display_format': 'dd MMMM YYYY'
},
}
for id in ids:
res[id] = {}
date_begin = datetime.strptime(self.browse(cr, uid, id, context=context).date, tools.DEFAULT_SERVER_DATETIME_FORMAT)
......@@ -199,9 +187,9 @@ class MassMailing(osv.Model):
date_begin_str = date_begin.strftime(tools.DEFAULT_SERVER_DATETIME_FORMAT)
date_end_str = date_end.strftime(tools.DEFAULT_SERVER_DATETIME_FORMAT)
domain = [('mass_mailing_id', '=', id), ('opened', '>=', date_begin_str), ('opened', '<=', date_end_str)]
res[id]['opened_monthly'] = self.__get_bar_values(cr, uid, id, obj, domain, ['opened'], 'opened_count', 'opened', context=context)
res[id]['opened_monthly'] = self.__get_bar_values(cr, uid, id, obj, domain, ['opened'], 'opened_count', 'opened:day', context=context)
domain = [('mass_mailing_id', '=', id), ('replied', '>=', date_begin_str), ('replied', '<=', date_end_str)]
res[id]['replied_monthly'] = self.__get_bar_values(cr, uid, id, obj, domain, ['replied'], 'replied_count', 'replied', context=context)
res[id]['replied_monthly'] = self.__get_bar_values(cr, uid, id, obj, domain, ['replied'], 'replied_count', 'replied:day', context=context)
return res
def _get_statistics(self, cr, uid, ids, name, arg, context=None):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment