Commit 82ed59d3 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Reset domain_tree and report_tree, only if reset_domain_tree and...

Reset domain_tree and report_tree, only if reset_domain_tree and reset_report_tree are True explicitly, respectively.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@7083 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c7fb7be0
......@@ -325,15 +325,18 @@ class SelectionTool( UniqueObject, SimpleItem ):
selection.edit(invert_mode=1, uids=selection_uids, checked_uids=selection_uids)
security.declareProtected(ERP5Permissions.View, 'setSelectionToAll')
def setSelectionToAll(self, selection_name, REQUEST=None):
def setSelectionToAll(self, selection_name, REQUEST=None,
reset_domain_tree=False, reset_report_tree=False):
"""
Resets the selection
"""
selection = self.getSelectionFor(selection_name, REQUEST=REQUEST)
if selection is not None:
selection.edit(invert_mode=0, params={}, checked_uids=[],
domain=None, domain_path=None, domain_list=(),
report=None, report_path=None, report_list=())
selection.edit(invert_mode=0, params={}, checked_uids=[])
if reset_domain_tree:
selection.edit(domain=None, domain_path=None, domain_list=())
if reset_report_tree:
selection.edit(report=None, report_path=None, report_list=())
security.declareProtected(ERP5Permissions.View, 'setSelectionSortOrder')
def setSelectionSortOrder(self, selection_name, sort_on, REQUEST=None):
......@@ -550,7 +553,6 @@ class SelectionTool( UniqueObject, SimpleItem ):
#form_id = request.form_id
selection_name = request.list_selection_name
selection = self.getSelectionFor(selection_name, REQUEST=REQUEST)
if selection is not None:
params = selection.getParams()
......
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