Commit db55efe9 authored by Jérome Perrin's avatar Jérome Perrin

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

parent 2d484a69
......@@ -680,7 +680,10 @@ for key, data in line_per_account.items():\n
sort_key = (node_string_index, node_title, mirror_section_title)\n
analytic_dict = dict()\n
for analytic, uid in zip(group_analytic, analytic_key_list):\n
title = getAnalyticTitleFromUid(uid)\n
if analytic == \'string_index\':\n
title = uid\n
else:\n
title = getAnalyticTitleFromUid(uid)\n
analytic_dict[analytic] = title\n
sort_key += (title, )\n
\n
......
......@@ -101,6 +101,9 @@ for base_category in \\\n
title = portal.portal_categories.restrictedTraverse(base_category).getTitle()\n
analytic_column_list += ((\'%s_translated_title\' % base_category, title),)\n
\n
# XXX should be based on some preference !\n
analytic_column_list += ((\'string_index\', \'Donor Analytic Code\'),)\n
\n
return analytic_column_list\n
</string> </value>
</item>
......
......@@ -119,6 +119,9 @@ for analytic in group_analytic:\n
extra_columns += ((\'funding_uid\',\n
context.AccountingTransactionLine_getFundingBaseCategoryTitle()),)\n
group_analytic_uid += (\'funding_uid\',)\n
elif analytic == \'string_index\':\n
extra_columns += ((\'string_index\', \'Donor Analytic Code\'),)\n
group_analytic_uid += (\'string_index\',)\n
else:\n
for analytic_column in possible_analytic_column_list:\n
if analytic_column[0] == analytic:\n
......
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