[FIX]crm: use DEFAULT_SERVER_DATETIME_FORMAT instead of just date_format, as the value could date + time
bzr revid: dle@openerp.com-20140205145049-g9ctnqjezz0eon73
This commit is contained in:
parent
c68c5837aa
commit
62b317f7dc
|
@ -124,7 +124,7 @@ class crm_case_section(osv.osv):
|
|||
} for i in range(self._period_number - 1, -1, -1)]
|
||||
group_obj = obj.read_group(cr, uid, domain, read_fields, groupby_field, context=context)
|
||||
for group in group_obj:
|
||||
group_begin_date = datetime.strptime(group['__domain'][0][2], tools.DEFAULT_SERVER_DATE_FORMAT)
|
||||
group_begin_date = datetime.strptime(group['__domain'][0][2], tools.DEFAULT_SERVER_DATETIME_FORMAT)
|
||||
month_delta = relativedelta.relativedelta(month_begin, group_begin_date)
|
||||
section_result[self._period_number - (month_delta.months + 1)] = {'value': group.get(value_field, 0), 'tooltip': group_begin_date.strftime('%B')}
|
||||
return section_result
|
||||
|
|
Loading…
Reference in New Issue