[Erp5-report] r13104 - in /erp5/trunk/products: ERP5/tests/ ERP5Form/
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Feb 28 14:51:39 CET 2007
Author: kazuhiko
Date: Wed Feb 28 14:51:30 2007
New Revision: 13104
URL: http://svn.erp5.org?rev=13104&view=rev
Log:
rename domain_selection to selection_domain.
Modified:
erp5/trunk/products/ERP5/tests/testInventory.py
erp5/trunk/products/ERP5Form/ListBox.py
Modified: erp5/trunk/products/ERP5/tests/testInventory.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testInventory.py?rev=13104&r1=13103&r2=13104&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testInventory.py (original)
+++ erp5/trunk/products/ERP5/tests/testInventory.py Wed Feb 28 14:51:30 2007
@@ -1242,13 +1242,13 @@
]
for expected_values in expected_values_list:
- domain_selection = DomainSelection(domain_dict = {'destination_section':organisation_list[expected_values['id']],
+ selection_domain = DomainSelection(domain_dict = {'destination_section':organisation_list[expected_values['id']],
'source_section':organisation_list[expected_values['id']]})
values = expected_values['values']
for value in values:
date = value['date']
e_inventory = value['inventory']
- self._testGetInventory(expected=e_inventory, at_date=date, selection_domain=domain_selection)
+ self._testGetInventory(expected=e_inventory, at_date=date, selection_domain=selection_domain)
def stepTestGetInventoryListOnSection(self, sequence=None, sequence_list=None, **kw):
Modified: erp5/trunk/products/ERP5Form/ListBox.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Form/ListBox.py?rev=13104&r1=13103&r2=13104&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/ListBox.py (original)
+++ erp5/trunk/products/ERP5Form/ListBox.py Wed Feb 28 14:51:30 2007
@@ -81,12 +81,12 @@
"""This class describes a report tree.
"""
def __init__(self, obj = None, is_pure_summary = False, depth = 0, is_open = False,
- domain_selection = None, exception_uid_list = None, base_category = None):
+ selection_domain = None, exception_uid_list = None, base_category = None):
self.obj = obj
self.is_pure_summary = is_pure_summary
self.depth = depth
self.is_open = is_open
- self.domain_selection = domain_selection
+ self.selection_domain = selection_domain
self.exception_uid_list = exception_uid_list
if exception_uid_list is None:
self.exception_uid_set = None
@@ -106,13 +106,13 @@
"""This class describes a report section.
"""
def __init__(self, is_summary = False, object_list = (), object_list_len = 0,
- is_open = False, domain_selection = None, context = None, offset = 0,
+ is_open = False, selection_domain = None, context = None, offset = 0,
depth = 0):
self.is_summary = is_summary
self.object_list = object_list
self.object_list_len = object_list_len
self.is_open = is_open
- self.domain_selection = domain_selection
+ self.selection_domain = selection_domain
self.context = context
self.offset = offset
self.depth = depth
@@ -1205,7 +1205,7 @@
domain_dict = {}
for k, v in new_root_dict.iteritems():
domain_dict[k] = v[1]
- domain_selection = DomainSelection(domain_dict = domain_dict)
+ selection_domain = DomainSelection(domain_dict = domain_dict)
if base_category == 'parent':
exception_uid_list = []
@@ -1225,13 +1225,13 @@
# Summary (open)
tree_list.append(ReportTree(obj = obj, is_pure_summary = True, depth = depth,
base_category = base_category,
- is_open = True, domain_selection = domain_selection,
+ is_open = True, selection_domain = selection_domain,
exception_uid_list = exception_uid_list))
if is_report_opened:
# List (contents, closed, must be strict selection)
tree_list.append(ReportTree(obj = obj, is_pure_summary = False, depth = depth,
base_category = base_category,
- is_open = False, domain_selection = domain_selection,
+ is_open = False, selection_domain = selection_domain,
exception_uid_list = exception_uid_list))
tree_list.extend(self.makeReportTreeList(root_dict = new_root_dict,
report_path = report_path,
@@ -1244,7 +1244,7 @@
# Summary (closed)
tree_list.append(ReportTree(obj = obj, is_pure_summary = True, depth = depth,
base_category = base_category,
- is_open = False, domain_selection = domain_selection,
+ is_open = False, selection_domain = selection_domain,
exception_uid_list = exception_uid_list))
return tree_list
@@ -1454,7 +1454,7 @@
# FIXME: this code needs optimization. The query should be delayed
# as late as possible, because this code queries all data, even if
# it is not displayed.
- selection.edit(report = report_tree.domain_selection)
+ selection.edit(report = report_tree.selection_domain)
if report_tree.is_pure_summary and self.showStat():
# Push a new select_expression.
@@ -1479,7 +1479,7 @@
stat_context.domain_url = report_tree.domain_url
report_section_list.append(ReportSection(is_summary = True, object_list = [stat_context],
object_list_len = 1, is_open = report_tree.is_open,
- domain_selection = report_tree.domain_selection,
+ selection_domain = report_tree.selection_domain,
context = stat_context, depth = report_tree.depth))
else:
selection.edit(params = param_dict)
@@ -1508,7 +1508,7 @@
report_section_list.append(ReportSection(is_summary = False, object_list = object_list,
object_list_len = object_list_len,
is_open = report_tree.is_open,
- domain_selection = report_tree.domain_selection,
+ selection_domain = report_tree.selection_domain,
depth = report_tree.depth))
else:
stat_context = report_tree.obj.asContext()
@@ -1522,14 +1522,14 @@
object_list = [object_list[0]],
object_list_len = 1,
is_open = True,
- domain_selection = report_tree.domain_selection,
+ selection_domain = report_tree.selection_domain,
context = stat_context,
depth = report_tree.depth))
report_section_list.append(ReportSection(is_summary = False,
object_list = object_list,
object_list_len = object_list_len - 1,
is_open = True,
- domain_selection = report_tree.domain_selection,
+ selection_domain = report_tree.selection_domain,
offset = 1,
depth = report_tree.depth))
else:
@@ -1539,7 +1539,7 @@
object_list = [report_tree.obj],
object_list_len = 1,
is_open = report_tree.is_open,
- domain_selection = report_tree.domain_selection,
+ selection_domain = report_tree.selection_domain,
context = stat_context,
depth = report_tree.depth))
else:
@@ -1548,7 +1548,7 @@
object_list = [None],
object_list_len = 1,
is_open = report_tree.is_open,
- domain_selection = report_tree.domain_selection,
+ selection_domain = report_tree.selection_domain,
context = stat_context,
depth = report_tree.depth))
@@ -1661,7 +1661,7 @@
line = line_class(renderer = self, obj = current_section.object_list[offset],
index = index, is_summary = current_section.is_summary,
context = current_section.context, is_open = current_section.is_open,
- domain_selection = current_section.domain_selection,
+ selection_domain = current_section.selection_domain,
depth = current_section.depth)
line_list.append(line)
except IndexError:
@@ -1685,7 +1685,7 @@
"""This class describes a line in a ListBox to assist ListBoxRenderer.
"""
def __init__(self, renderer = None, obj = None, index = 0, is_summary = False, context = None,
- is_open = False, domain_selection = None, depth = 0):
+ is_open = False, selection_domain = None, depth = 0):
"""In reality, the object is a brain or a brain-like object.
"""
self.renderer = renderer
@@ -1694,7 +1694,7 @@
self.is_summary = is_summary
self.context = context
self.is_open = is_open
- self.domain_selection = domain_selection
+ self.selection_domain = selection_domain
self.depth = depth
# Because it is not easy to pass an instance object implicitly to a method
@@ -1761,7 +1761,7 @@
def getDomainSelection(self):
"""Return the domain selection. Used only for a summary line.
"""
- return self.domain_selection
+ return self.selection_domain
def getValueList(self):
"""Return the list of values corresponding to selected columns.
More information about the Erp5-report
mailing list