Commit 3efc33a5 authored by Mame Coumba Sall's avatar Mame Coumba Sall Committed by Julien Muchembled

Rename scripts used as listbox methods and import those changes where they're required

parent fac0ba5a
......@@ -122,7 +122,7 @@ return [Object(debit_price=debit, credit_price=credit)]\n
</item>
<item>
<key> <string>id</string> </key>
<value> <string>AccountModule_getGeneralLedgerSummary</string> </value>
<value> <string>AccountModule_getGeneralLedgerSummarySectionList</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -783,7 +783,7 @@ return new_line_list\n
</item>
<item>
<key> <string>id</string> </key>
<value> <string>AccountModule_getAccountListForTrialBalance</string> </value>
<value> <string>AccountModule_getTrialBalanceAccountList</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -323,6 +323,10 @@
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>anchor</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>columns</string> </key>
<value>
......@@ -459,10 +463,18 @@
<list/>
</value>
</item>
<item>
<key> <string>global_search_column</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>hide_rows_on_no_search_criterion</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>lines</string> </key>
<value> <int>25</int> </value>
......@@ -483,6 +495,10 @@
<list/>
</value>
</item>
<item>
<key> <string>page_navigation_template</string> </key>
<value> <string>ListBox_viewSliderPageNavigationRenderer</string> </value>
</item>
<item>
<key> <string>page_template</string> </key>
<value> <string></string> </value>
......@@ -503,6 +519,10 @@
<key> <string>report_tree</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>row_css_method</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>search</string> </key>
<value> <int>0</int> </value>
......@@ -545,10 +565,22 @@
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>style_columns</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Accounts</string> </value>
</item>
<item>
<key> <string>untranslatable_columns</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>url_columns</string> </key>
<value>
......@@ -569,7 +601,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>AccountModule_getAccountListForTrialBalance</string> </value>
<value> <string>AccountModule_getTrialBalanceAccountList</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -417,6 +417,10 @@
<list/>
</value>
</item>
<item>
<key> <string>global_search_column</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
......@@ -445,6 +449,10 @@
<list/>
</value>
</item>
<item>
<key> <string>page_navigation_template</string> </key>
<value> <string>ListBox_viewSliderPageNavigationRenderer</string> </value>
</item>
<item>
<key> <string>page_template</string> </key>
<value> <string></string> </value>
......@@ -509,6 +517,12 @@
<key> <string>stat_method</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>style_columns</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>General Ledger Summary</string> </value>
......@@ -539,7 +553,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>AccountModule_getGeneralLedgerSummary</string> </value>
<value> <string>AccountModule_getGeneralLedgerSummarySectionList</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -628,7 +628,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>ListBox_listCashContainers</string> </value>
<value> <string>Listbox_getCashContainerList</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -119,7 +119,7 @@ return context.ListBox_initializeFastInput()\n
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ListBox_listCashContainers</string> </value>
<value> <string>Listbox_getCashContainerList</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -563,7 +563,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>ListBox_listCheckbook</string> </value>
<value> <string>Listbox_listCheckbookList</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -129,7 +129,7 @@ return context.ListBox_initializeFastInput()\n
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ListBox_listCheckbook</string> </value>
<value> <string>Listbox_listCheckbookList</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -525,7 +525,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>ListBox_initializeFastInput</string> </value>
<value> <string>Listbox_initializeFastInputDocumentList</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -538,7 +538,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <unicode>ListBox_initializeFastInput</unicode> </value>
<value> <string>Listbox_initializeFastInputDocumentList</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -570,7 +570,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>ListBox_initializeFastInput</string> </value>
<value> <string>Listbox_initializeFastInputDocumentList</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -518,7 +518,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>FastInput_initialize</string> </value>
<value> <string>FastInput_initializeDocumentList</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -518,7 +518,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>FastInput_initialize</string> </value>
<value> <string>FastInput_initializeDocumentList</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -546,7 +546,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>FastInput_initialize</string> </value>
<value> <string>FastInput_initializeDocumentList</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -586,7 +586,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>FastInput_initialize</string> </value>
<value> <string>FastInput_initializeDocumentList</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -570,7 +570,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>FastInput_initialize</string> </value>
<value> <string>FastInput_initializeDocumentList</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -594,7 +594,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>FastInput_initialize</string> </value>
<value> <string>FastInput_initializeDocumentList</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -84,7 +84,7 @@ return l\n
</item>
<item>
<key> <string>id</string> </key>
<value> <string>FastInput_initialize</string> </value>
<value> <string>FastInput_initializeDocumentList</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -558,7 +558,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>FastInput_initialize</string> </value>
<value> <string>FastInput_initializeDocumentList</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -546,7 +546,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>FastInput_initialize</string> </value>
<value> <string>FastInput_initializeDocumentList</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -558,7 +558,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>FastInput_initialize</string> </value>
<value> <string>FastInput_initializeDocumentList</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -524,6 +524,12 @@
<key> <string>title</string> </key>
<value> <string>Scenarii with Steps</string> </value>
</item>
<item>
<key> <string>untranslatable_columns</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>url_columns</string> </key>
<value>
......@@ -547,7 +553,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>FastInput_initialize</string> </value>
<value> <string>FastInput_initializeDocumentList</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -86,7 +86,7 @@ for o in objects:\n
# orphan object\n
orphans_list.append(object_path)\n
# Recursively check children\n
orphans_list.extend([x.uid for x in context.Base_getOrphanObjects(object=o)])\n
orphans_list.extend([x.uid for x in context.Base_getOrphanObjectList(object=o)])\n
\n
object_list = []\n
for orphan in orphans_list:\n
......@@ -107,7 +107,7 @@ return object_list\n
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_getOrphanObjects</string> </value>
<value> <string>Base_getOrphanObjectList</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -509,7 +509,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>Base_getOrphanObjects</string> </value>
<value> <string>Base_getOrphanObjectList</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>return context.ListBox_initializeFastInput(\n
<value> <string>return context.Listbox_initializeFastInputDocumentList(\n
empty_line_number=10, **kw)\n
</string> </value>
</item>
......@@ -60,7 +60,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>BusinessTemplate_initializeListBoxForRenameFastInput</string> </value>
<value> <string>BusinessTemplate_initializeListBoxToGetProxyFieldToRenameList</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>return context.ListBox_initializeFastInput(\n
<value> <string>return context.Listbox_initializeFastInputDocumentList(\n
listbox_id=\'preview_listbox\', empty_line_number=0, **kw)\n
</string> </value>
</item>
......@@ -60,7 +60,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>BusinessTemplate_initializePreviewListBoxForRenameFastInput</string> </value>
<value> <string>BusinessTemplate_initializePreviewListBoxToGetProxyFieldToRenameList</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -539,7 +539,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>BusinessTemplate_initializeListBoxForRenameFastInput</string> </value>
<value> <string>BusinessTemplate_initializeListBoxToGetProxyFieldToRenameList</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -555,7 +555,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>BusinessTemplate_initializePreviewListBoxForRenameFastInput</string> </value>
<value> <string>BusinessTemplate_initializePreviewListBoxToGetProxyFieldToRenameList</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -64,7 +64,7 @@ return context.portal_simulation.getInventoryList(transformed_resource=transform
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Resource_getTransformedResourceInventory</string> </value>
<value> <string>Resource_getTransformedResourceInventoryList</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -597,7 +597,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>Resource_getTransformedResourceInventory</string> </value>
<value> <string>Resource_getTransformedResourceInventoryList</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -635,7 +635,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>Project_initializeFastInput</string> </value>
<value> <string>Project_initializeFastInputTaskList</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -89,7 +89,7 @@ return l\n
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Project_initializeFastInput</string> </value>
<value> <string>Project_initializeFastInputTaskList</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -583,7 +583,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>Project_initializeFastInput</string> </value>
<value> <string>Project_initializeFastInputTaskList</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -1398,7 +1398,7 @@ class TemplateTool (BaseTool):
pass
install_kw = {}
for listbox_line in imported_bt5.BusinessTemplate_getModifiedObject():
for listbox_line in imported_bt5.BusinessTemplate_getModifiedObjectList():
item = listbox_line.object_id
state = listbox_line.object_state
if state.startswith('Removed'):
......
......@@ -130,7 +130,7 @@ return object_list\n
</item>
<item>
<key> <string>id</string> </key>
<value> <string>BusinessTemplate_getModifiedObject</string> </value>
<value> <string>BusinessTemplate_getModifiedObjectList</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -540,7 +540,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>BusinessTemplate_getModifiedObject</string> </value>
<value> <string>BusinessTemplate_getModifiedObjectList</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -59,7 +59,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>CategoryTool_getImportReportFromRequest</string> </value>
<value> <string>CategoryTool_getFromRequestImportReportFieldList</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -531,7 +531,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>CategoryTool_getImportReportFromRequest</string> </value>
<value> <string>CategoryTool_getFromRequestImportReportFieldList</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -135,8 +135,7 @@ def checkField(folder, form, field):\n
if a not in (None, "portal_catalog", "searchFolder", "objectValues",\n
"contentValues", "ListBox_initializeFastInput"):\n
if not a.endswith(\'List\'):\n
if 0:\n
error_message += "%s : %s : %r Bad Naming Convention\\n" % (path, id, a)\n
error_message += "%s : %s : %r Bad Naming Convention\\n" % (path, id, a)\n
return error_message\n
\n
def isListBox(field):\n
......
......@@ -2547,7 +2547,7 @@ class BusinessTemplateMixin(TestDeveloperMixin, ERP5TypeTestCase, LogInterceptor
def stepReinstallBusinessTemplate(self, sequence=None, **kw):
import_bt = sequence.get('current_bt')
listbox_object_list = import_bt.BusinessTemplate_getModifiedObject()
listbox_object_list = import_bt.BusinessTemplate_getModifiedObjectList()
install_kw = {}
for listbox_line in listbox_object_list:
install_kw[listbox_line.object_id] = listbox_line.choice_item_list[0][1]
......@@ -2555,7 +2555,7 @@ class BusinessTemplateMixin(TestDeveloperMixin, ERP5TypeTestCase, LogInterceptor
def stepCheckBeforeReinstall(self, sequence=None, **kw):
import_bt = sequence.get('current_bt')
diff_list = import_bt.BusinessTemplate_getModifiedObject()
diff_list = import_bt.BusinessTemplate_getModifiedObjectList()
self.assertTrue('portal_types/Geek Object/become_geek'
in [line.object_id for line in diff_list])
......
......@@ -920,8 +920,8 @@ class ERP5TypeCommandLineTestCase(ERP5TypeTestCaseMixin):
quiet=True):
template_tool = self.portal.portal_templates
update_business_templates = os.environ.get('update_business_templates') is not None
BusinessTemplate_getModifiedObject = aq_base(
getattr(self.portal, 'BusinessTemplate_getModifiedObject', None))
BusinessTemplate_getModifiedObjectList = aq_base(
getattr(self.portal, 'BusinessTemplate_getModifiedObjectList', None))
# Add some business templates
for url, bt_title in business_template_list:
......@@ -931,7 +931,7 @@ class ERP5TypeCommandLineTestCase(ERP5TypeTestCaseMixin):
if update_business_templates:
if not quiet:
ZopeTestCase._print('Updating %s business template ... ' % bt_title)
if BusinessTemplate_getModifiedObject is not None:
if BusinessTemplate_getModifiedObjectList is not None:
get_install_kw = True
else:
continue
......@@ -949,7 +949,7 @@ class ERP5TypeCommandLineTestCase(ERP5TypeTestCaseMixin):
install_kw = None
if get_install_kw:
install_kw = {}
listbox_object_list = BusinessTemplate_getModifiedObject.__of__(bt)()
listbox_object_list = BusinessTemplate_getModifiedObjectList.__of__(bt)()
for listbox_line in listbox_object_list:
install_kw[listbox_line.object_id] = listbox_line.choice_item_list[0][1]
bt.install(light_install=light_install,
......
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