Commit 378a9c85 authored by Jérome Perrin's avatar Jérome Perrin

CUSTOM: Add Donor Analytic Code as an analytic column (hardcoded)

parent f134f853
......@@ -685,7 +685,10 @@ for key, data in line_per_account.iteritems():
sort_key = (node_string_index, node_title, mirror_section_title)
analytic_dict = {}
for analytic, uid in zip(group_analytic, analytic_key_list):
title = getAnalyticTitleFromUid(uid)
if analytic == 'string_index':
title = uid
else:
title = getAnalyticTitleFromUid(uid)
analytic_dict[analytic] = title
if analytic == 'section_uid':
analytic_dict['Movement_getSectionPriceCurrency'] = getSectionPriceCurrencyFromSectionUid(uid)
......
......@@ -49,4 +49,7 @@ for base_category in \
title = portal.portal_categories.restrictedTraverse(base_category).getTitle()
analytic_column_list += (('%s_translated_title' % base_category, title),)
# XXX should be based on some preference !
analytic_column_list += (('string_index', 'Donor Analytic Code'),)
return analytic_column_list
......@@ -71,6 +71,9 @@ for analytic in group_analytic:
elif analytic == 'section':
extra_columns += (('section_uid', 'Section'), ('Movement_getSectionPriceCurrency', 'Accounting Currency'))
group_analytic_uid += ('section_uid',)
elif analytic == 'string_index':
extra_columns += (('string_index', 'Donor Analytic Code'),)
group_analytic_uid += ('string_index',)
else:
for analytic_column in possible_analytic_column_list:
if analytic_column[0] == analytic:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment