Commit f38407f6 authored by Tatuya Kamada's avatar Tatuya Kamada

Fix to pass movement uid when using movement axis with getInventoryListQueryDict.

parent b214495e
...@@ -201,18 +201,20 @@ class NodeBudgetVariation(BudgetVariation): ...@@ -201,18 +201,20 @@ class NodeBudgetVariation(BudgetVariation):
portal_categories = self.getPortalObject().portal_categories portal_categories = self.getPortalObject().portal_categories
query_dict = dict() query_dict = dict()
uid_based_axis = False
if axis == 'movement': if axis == 'movement':
axis = 'default_%s_uid' % base_category axis = 'default_%s_uid' % base_category
query_dict['select_list'] = [axis] query_dict['select_list'] = [axis]
query_dict['group_by'] = [axis] query_dict['group_by'] = [axis]
uid_based_axis = True
elif axis == 'movement_strict_membership': elif axis == 'movement_strict_membership':
axis = 'default_strict_%s_uid' % base_category axis = 'default_strict_%s_uid' % base_category
query_dict['select_list'] = [axis] query_dict['select_list'] = [axis]
query_dict['group_by'] = [axis] query_dict['group_by'] = [axis]
uid_based_axis = True
else: else:
query_dict['group_by_%s' % axis] = True query_dict['group_by_%s' % axis] = True
uid_based_axis = False
if axis in ('node', 'section', 'payment', 'function', 'project', if axis in ('node', 'section', 'payment', 'function', 'project',
'mirror_section', 'mirror_node', 'funding' ): 'mirror_section', 'mirror_node', 'funding' ):
axis = '%s_uid' % axis axis = '%s_uid' % axis
......
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