Commit c8f63457 authored by Vincent Pelletier's avatar Vincent Pelletier

Distinguish the case where no group by is given and the case where only a...

Distinguish the case where no group by is given and the case where only a group by resource is given.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16100 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 57967c90
...@@ -821,7 +821,7 @@ class SimulationTool(BaseTool): ...@@ -821,7 +821,7 @@ class SimulationTool(BaseTool):
group_by_payment=0, group_by_payment=0,
group_by_variation=0, group_by_sub_variation=0, group_by_variation=0, group_by_sub_variation=0,
group_by_movement=0, group_by_movement=0,
group_by_resource=1, group_by_resource=None,
**ignored): **ignored):
""" """
Set defaults group_by parameters Set defaults group_by parameters
...@@ -837,8 +837,10 @@ class SimulationTool(BaseTool): ...@@ -837,8 +837,10 @@ class SimulationTool(BaseTool):
if group_by_node or group_by_mirror_node or group_by_section or \ if group_by_node or group_by_mirror_node or group_by_section or \
group_by_mirror_section or group_by_payment or \ group_by_mirror_section or group_by_payment or \
group_by_sub_variation or group_by_variation or group_by_movement: group_by_sub_variation or group_by_variation or group_by_movement:
if group_by_resource is None:
group_by_resource = 1
new_group_by_dict['group_by_resource'] = group_by_resource new_group_by_dict['group_by_resource'] = group_by_resource
else: elif group_by_resource is None:
new_group_by_dict['group_by_movement'] = 1 new_group_by_dict['group_by_movement'] = 1
new_group_by_dict['group_by_node'] = 1 new_group_by_dict['group_by_node'] = 1
new_group_by_dict['group_by_resource'] = 1 new_group_by_dict['group_by_resource'] = 1
......
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