Commit 242930db authored by Tatuya Kamada's avatar Tatuya Kamada

- remove wrong comments about Report.py

  and fix the test


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26532 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0676bf4f
...@@ -597,10 +597,8 @@ class TestFormPrintout(ERP5TypeTestCase): ...@@ -597,10 +597,8 @@ class TestFormPrintout(ERP5TypeTestCase):
erp5form.addERP5Form(id='Foo2_view', title='Foo2') erp5form.addERP5Form(id='Foo2_view', title='Foo2')
foo2_view = custom.Foo2_view foo2_view = custom.Foo2_view
# Attention: Report.py popReport, pushReport foo2_view.manage_addField('listbox_report', 'listbox report', 'ListBox')
# only accepts named 'listbox' Listbox listbox = foo2_view.listbox_report
foo2_view.manage_addField('listbox', 'listbox', 'ListBox')
listbox = foo2_view.listbox
createZODBPythonScript( createZODBPythonScript(
self.portal.portal_skins.custom, self.portal.portal_skins.custom,
...@@ -615,6 +613,7 @@ return foo_list ...@@ -615,6 +613,7 @@ return foo_list
) )
message = listbox.ListBox_setPropertyList( message = listbox.ListBox_setPropertyList(
field_list_method = 'FooReport_getFooList', field_list_method = 'FooReport_getFooList',
field_selection_name = 'listbox_report_selection',
field_portal_types = 'Foo Line | Foo Line', field_portal_types = 'Foo Line | Foo Line',
field_columns = 'id|ID\ntitle|Title\nquantity|Quantity\nstart_date|Date',) field_columns = 'id|ID\ntitle|Title\nquantity|Quantity\nstart_date|Date',)
self.failUnless('Set Successfully' in message) self.failUnless('Set Successfully' in message)
...@@ -627,9 +626,11 @@ from Products.ERP5Form.Report import ReportSection ...@@ -627,9 +626,11 @@ from Products.ERP5Form.Report import ReportSection
r1 = ReportSection(path=context.getPhysicalPath(), r1 = ReportSection(path=context.getPhysicalPath(),
form_id='Foo2_view', form_id='Foo2_view',
selection_name='listbox_report_selection',
selection_params={'title':'foo_04_Iteration_1'}) selection_params={'title':'foo_04_Iteration_1'})
r2 = ReportSection(path=context.getPhysicalPath(), r2 = ReportSection(path=context.getPhysicalPath(),
form_id='Foo2_view', form_id='Foo2_view',
selection_name='listbox_report_selection',
selection_params={'title':'foo_04_Iteration_2'}) selection_params={'title':'foo_04_Iteration_2'})
report_section_list = [r1, r2] report_section_list = [r1, r2]
return report_section_list return report_section_list
......
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