Commit ee4a06c8 authored by Rie Kozai's avatar Rie Kozai

improve naming and move global action into portal_properties

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15968 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent bb7d5830
......@@ -42,7 +42,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>export_ods</string> </value>
<value> <string>ods_export</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
......@@ -58,7 +58,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Export as Spreadsheet</string> </value>
<value> <string>Export Content As Spread Sheet</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
......
......@@ -58,7 +58,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>ODS Report</string> </value>
<value> <string>Export Report As Spread Sheet</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>from Products.ERP5Type.Document import newTempOOoDocument\n
td = newTempOOoDocument(context, \'testOOo\')\n
td.edit(base_content_type=\'application/vnd.oasis.opendocument.spreadsheet\', base_data=1)\n
return [(\'\', \'\')] + td.getTargetFormatItemList()\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>Products.ERP5Type.Document</string>
<string>newTempOOoDocument</string>
<string>context</string>
<string>td</string>
<string>_getattr_</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_getExportFormat</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -74,7 +74,7 @@
<value>
<list>
<string>your_format</string>
<string>landscape</string>
<string>your_landscape</string>
</list>
</value>
</item>
......
......@@ -251,7 +251,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Format</string> </value>
<value> <string>Export Format</string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
......@@ -281,7 +281,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>here/Base_getExportFormat</string> </value>
<value> <string>here/Base_getConversionFormatList</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -14,7 +14,7 @@
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>landscape</string> </value>
<value> <string>your_landscape</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -163,7 +163,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>landscape</string> </value>
<value> <string>Page Preview : Landscape</string> </value>
</item>
</dictionary>
</value>
......
......@@ -73,26 +73,24 @@ from Products.ERP5Type.Message import Message\n
\n
form = context\n
request = context.REQUEST\n
selection_name=request.form[\'selection_name\']\n
translate = lambda msg: Message(\'ui\', msg)\n
\n
report_section_list = []\n
test = []\n
portal = context.getPortalObject()\n
selection_name=request.form[\'selection_name\']\n
translate = lambda msg: Message(\'ui\', msg)\n
\n
# get all documents in the selection\n
#get all documents in the selection\n
for doc in portal.portal_selections.callSelectionFor(selection_name, context=form):\n
doc = doc.getObject()\n
title = doc.getTitle()\n
title = translate(title)\n
\n
report_section_list.append(ReportSection(level=1, title=title, form_id=None))\n
\n
for action in portal.portal_actions.listFilteredActionsFor(doc)[\'object_view\']:\n
form_id = action[\'url\'].split(\'/\')[-1].split(\'?\')[0]\n
action_title= action[\'title\']\n
action_title = translate(action_title)\n
if str(action_title) != \'History\' and str(action_title) != \'Metadata\':\n
report_section_list.append(ReportSection(path=doc.getPath(), form_id=form_id, level=2, title=action_title))\n
action_title= action[\'title\'] \n
\n
if action_title != \'History\' and action_title != \'Metadata\':\n
report_section_list.append(ReportSection(path=doc.getPath(), form_id=form_id, level=2, title=\'%s - %s\' % (title, translate(action_title))))\n
\n
return report_section_list\n
</string> </value>
......@@ -145,12 +143,11 @@ return report_section_list\n
<string>form</string>
<string>_getattr_</string>
<string>request</string>
<string>report_section_list</string>
<string>portal</string>
<string>_getitem_</string>
<string>selection_name</string>
<string>translate</string>
<string>report_section_list</string>
<string>test</string>
<string>portal</string>
<string>_getiter_</string>
<string>doc</string>
<string>title</string>
......@@ -158,7 +155,6 @@ return report_section_list\n
<string>action</string>
<string>form_id</string>
<string>action_title</string>
<string>str</string>
</tuple>
</value>
</item>
......
......@@ -97,8 +97,8 @@
<list>
<string>portal_skin</string>
<string>your_format</string>
<string>landscape</string>
<string>sheet_per_ReportSection</string>
<string>your_sheet_per_report_section</string>
<string>your_landscape</string>
</list>
</value>
</item>
......
......@@ -251,7 +251,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Format</string> </value>
<value> <string>Export Format</string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
......@@ -281,7 +281,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>here/Base_getExportFormat</string> </value>
<value> <string>here/Base_getConversionFormatList</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -14,7 +14,7 @@
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>landscape</string> </value>
<value> <string>your_landscape</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -163,7 +163,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Landscape</string> </value>
<value> <string>Page Preview : Landscape</string> </value>
</item>
</dictionary>
</value>
......
......@@ -14,7 +14,7 @@
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>sheet_per_ReportSection</string> </value>
<value> <string>your_sheet_per_report_section</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -163,7 +163,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>export a sheet per ReportSection</string> </value>
<value> <string>Export a Sheet per ReportSection</string> </value>
</item>
</dictionary>
</value>
......
......@@ -68,25 +68,22 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[
test = []\n
<value> <string>from Products.ERP5Type.Message import Message\n
\n
translate = lambda msg: Message(\'ui\', msg)\n
request = context.REQUEST\n
landscape = int(request.get(\'landscape\', 0))\n
context.log(\'landscape-script->>\', \'%r\' % context.pt)\n
if context.pt != \'form_list\':\n
if landscape == 1:\n
return context.Base_getODSStyleSheetLandscape\n
else:\n
return context.Base_getODSStyleSheetPortrait\n
return context.Base_getODSStyleSheet\n
else:\n
if landscape == 1:\n
return context.Base_getODSStyleSheetListLandscape\n
else:\n
return context.Base_getODSStyleSheetListPortrait\n
]]></string> </value>
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
......@@ -128,7 +125,9 @@ else:\n
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>test</string>
<string>Products.ERP5Type.Message</string>
<string>Message</string>
<string>translate</string>
<string>_getattr_</string>
<string>context</string>
<string>request</string>
......@@ -150,7 +149,7 @@ else:\n
</item>
<item>
<key> <string>id</string> </key>
<value> <string>OooTemplate_getStyleSheet</string> </value>
<value> <string>Base_getDynamicODSStyleSheet</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>from Products.ERP5Form.Report import ReportSection\n
from Products.ERP5Type.Message import Message\n
\n
person_name = \'\'\n
result_report_item_list= []\n
translate = lambda msg: Message(\'ui\', msg)\n
\n
for report_item in report_item_list:\n
level = report_item.getLevel()\n
if level == 1:\n
person_name = translate(str(report_item.getTitle()))\n
else:\n
form_id = report_item.getFormId()\n
title = translate(str(report_item.getTitle()))\n
path = report_item.getPath()\n
result_report_item_list.append(ReportSection(title=\'%s - %s\' % (person_name, title), level=level, form_id=form_id, path=path))\n
return result_report_item_list\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>report_item_list</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>report_item_list</string>
<string>Products.ERP5Form.Report</string>
<string>ReportSection</string>
<string>Products.ERP5Type.Message</string>
<string>Message</string>
<string>person_name</string>
<string>result_report_item_list</string>
<string>translate</string>
<string>_getiter_</string>
<string>report_item</string>
<string>_getattr_</string>
<string>level</string>
<string>str</string>
<string>form_id</string>
<string>title</string>
<string>path</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_getReportSectionName</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -63,9 +63,8 @@
<tal:block metal:use-macro="here/style_macros/macros/style_macro"/>\n
<office:body>\n
<office:spreadsheet>\n
<table:table table:style-name=\'ta1\' table:print=\'false\' table:name=\'Sheet1\' >\n
<table:table table:style-name=\'ta1\' table:print=\'false\' tal:attributes="table:name python: form.REQUEST[\'selection_name\'].split(\'_selection\')[0].replace(\'_\', \' \').capitalize()" >\n
<tal:block metal:define-macro="form_layout" tal:define="dummy python: request.set(\'here\', here); listbox python:form.get_fields_in_group(\'bottom\')[0]">\n
<tal:block tal:condition="python: listbox.meta_type == \'ListBox\' or (listbox.meta_type == \'ProxyField\' and listbox.getRecursiveTemplateField().meta_type == \'ListBox\')">\n
<tal:block metal:use-macro="here/listbox_ods_macro/macros/listbox">\n
<tal:block metal:fill-slot="list_header">\n
<table:table-header-rows>\n
......@@ -73,7 +72,7 @@
<tal:block tal:condition="python: is_report_tree_mode">\n
<table:table-cell table:style-name=\'report-column-title\' table:number-columns-spanned=\'1\' office:value-type=\'string\' >\n
<tal:block tal:condition="listboxline/getSectionName">\n
<text:p tal:content="python: here.Localozer.erp5_ui.gettext(listboxline/getSectionName).encode(\'utf-8\')" tal:attributes="style python:\'Section%s\' % listboxline.getSectionDepth()"/>\n
<text:p tal:content="python: here.Localozer.erp5_ui.gettext(listboxline/getSectionName).encode(\'utf-8\')"/>\n
</tal:block>\n
</table:table-cell>\n
</tal:block>\n
......@@ -99,11 +98,10 @@
</table:table-row>\n
</table:table-header-rows>\n
</tal:block>\n
<!--<tal:block metal:fill-slot=\'table_bottom_line\'>\n
<tal:block metal:fill-slot=\'table_bottom_line\'>\n
<tal:block tal:replace="nothing"> don\'t write bottom line in case of this form_list, Page Format of OOo works instead of it.</tal:block>\n
</tal:block>-->\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
</table:table>\n
</office:spreadsheet>\n
......@@ -126,7 +124,7 @@
</item>
<item>
<key> <string>ooo_stylesheet</string> </key>
<value> <string>OooTemplate_getStyleSheet</string> </value>
<value> <string>Base_getDynamicODSStyleSheet</string> </value>
</item>
<item>
<key> <string>title</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[
request = context.REQUEST\n
form = context\n
list_col_num = 0\n
col_count = 0\n
\n
field_list=form.get_fields_in_group(\'bottom\')\n
for field in field_list:\n
if field.meta_type == \'ListBox\' and not(field[\'hidden\']) and field[\'enabled\']:\n
listbox=field\n
listboxline_list = listbox.get_value(\'default\', render_format=\'list\', REQUEST=request)\n
for listboxline in listboxline_list:\n
if listboxline.isTitleLine():\n
for column_item in listboxline.getColumnItemList():\n
col_count = col_count + 1\n
if col_count != 0 and col_count > list_col_num:\n
list_col_num = col_count\n
col_count = 0\n
else:\n
continue\n
break\n
else:\n
continue\n
if list_col_num == 0:\n
return 3\n
else:\n
return int(list_col_num)\n
]]></string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>_getattr_</string>
<string>context</string>
<string>request</string>
<string>form</string>
<string>list_col_num</string>
<string>col_count</string>
<string>field_list</string>
<string>_getiter_</string>
<string>field</string>
<string>_getitem_</string>
<string>listbox</string>
<string>listboxline_list</string>
<string>listboxline</string>
<string>column_item</string>
<string>int</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listBox_getColumnNum</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -70,7 +70,7 @@
selection python: here.portal_selections.getSelectionFor(selection_name, REQUEST=request);\n
is_domain_tree_mode selection/domain_tree_mode | nothing;\n
is_report_tree_mode selection/report_tree_mode | nothing;" i18n:domain="ui">\n
\n
\n
<tal:block tal:condition="python: len(listboxline_list) > 1">\n
<tal:block tal:condition="python: is_domain_tree_mode">\n
<tal:block tal:define="domain_list python: selection.getDomainList()" tal:condition="python: len(domain_list) > 0" >\n
......@@ -82,7 +82,7 @@
</table:table-row>\n
</tal:block>\n
</tal:block>\n
\n
\n
<tal:block tal:repeat="listboxline python: listboxline_list">\n
<table:table-column table:style-name=\'co2\' />\n
<tal:block metal:define-slot="for_form_list" tal:condition="listboxline/isTitleLine | python: is_report_tree_mode">\n
......@@ -91,7 +91,7 @@
<tal:block tal:condition="python: is_report_tree_mode">\n
<table:table-cell table:style-name=\'report-column-title\' table:number-columns-spanned=\'1\' office:value-type=\'string\' >\n
<tal:block tal:condition="listboxline/getSectionName">\n
<text:p tal:content="python: here.Localozer.erp5_ui.gettext(listboxline/getSectionName).encode(\'utf-8\')" tal:attributes="style python:\'Section%s\' % listboxline.getSectionDepth()"/>\n
<text:p tal:content="python: here.Localozer.erp5_ui.gettext(listboxline/getSectionName).encode(\'utf-8\')"/>\n
</tal:block>\n
</table:table-cell>\n
</tal:block>\n
......@@ -118,7 +118,7 @@
</table:table-row>\n
</tal:block>\n
</tal:block>\n
\n
\n
<tal:block tal:condition="not:listboxline/isTitleLine">\n
<table:table-column table:style-name="co2"/>\n
<table:table-row>\n
......@@ -172,7 +172,7 @@
</table:table-row>\n
</tal:block>\n
</tal:block>\n
\n
\n
<table:table-column table:style-name="co2"/>\n
<table:table-row metal:define-slot="table_bottom_line">\n
<tal:block tal:repeat="listboxline python: listboxline_list">\n
......
......@@ -58,59 +58,14 @@
<tal:block metal:use-macro="here/style_macros/macros/style_macro"/>\n
<office:body>\n
<office:spreadsheet>\n
<tal:block tal:define="group_list python: form.get_groups(include_empty=1);\n
report_item_list python:report_method();\n
field_errors python: request.get(\'field_errors,{}\');\n
dummy python: request.set(\'here\', here); column_len form/listBox_getColumnNum;global sheet_per_reportsection python: int(request.get(\'sheet_per_ReportSection\', 0))">\n
\n
<!-- <table:table table:style-name=\'ta1\' table:print=\'false\' table:name=\'Sheet1\'>\n
<table:table-column table:style-name=\'co2\'/>\n
<table:table-column table:style-name=\'co3\'/>\n
<tal:block tal:repeat="group python: [g for g in form.get_groups() if g not in (\'bottom\', \'hidden\')]">\n
<tal:block tal:define="field_list python: form.get_fields_in_group(group);">\n
<tal:block tal:condition="python: field_list not in [None, []]">\n
<tal:block tal:repeat="field field_list">\n
<tal:block tal:condition="python:field.meta_type != \'HiddenStringField\'">\n
<table:table-row table:style-name=\'ro4\'>\n
<table:table-cell table:number-rows-spanned=\'1\' table:style-name=\'report-column-title\' office:value-type=\'string\'>\n
<text:p tal:content="python: here.Localizer.erp5_ui.gettext(field.get_value(\'title\')).encode(\'utf-8\')">\n
</text:p>\n
</table:table-cell>\n
<table:table-cell table:style-name=\'report-content-heading2-with-lines\' office:value-type=\'string\' tal:attributes="table:number-columns-spanned python: column_len" tal:define="value python: field.get_value(\'default\')">\n
<tal:block tal:condition="python: same_type(value,[]) or same_type(value,())">\n
<tal:block tal:repeat="item value">\n
<text:p tal:content="python: str(item)"></text:p>\n
</tal:block>\n
</tal:block>\n
<tal:block tal:condition="python: not (same_type(value, []) or same_type(value, ()) or same_type(value, None))">\n
<text:p tal:content="python: field.render_pdf(value)" ></text:p>\n
</tal:block>\n
<tal:block tal:condition="python: value is None">\n
<text:p tal:content="python: \' \'" ></text:p>\n
</tal:block>\n
</table:table-cell>\n
</table:table-row>\n
</tal:block>\n
</tal:block>\n
<table:table-row>\n
<table:table-cell table:style-name=\'Default\'><text:p>space dans report_view</text:p></table:table-cell>\n
</table:table-row>\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
<tal:block tal:define="field_list python: form.get_fields_in_group(\'bottom\')">\n
<tal:block tal:condition="python: field_list not in [None, []]">\n
<tal:block tal:repeat="field field_list">\n
<tal:block metal:use-macro="here/field_ods_macro/macros/field" />\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
</table:table>\n
-->\n
<tal:block tal:define="report_item_list python:report_method();\n
field_errors python: request.get(\'field_errors,{}\');\n
dummy python: request.set(\'here\', here);global sheet_per_reportsection python: int(request.get(\'sheet_per_report_section\', 0));global column_len python:3">\n
\n
<tal:block tal:define="portal_object here/portal_url/getPortalObject"> \n
<tal:block tal:condition="python: sheet_per_reportsection == 0">\n
<table:table table:name="report_view">\n
<table:table tal:attributes="table:name python:form.REQUEST[\'selection_name\'].split(\'_selection\')[0].replace(\'_\', \' \').capitalize()">\n
<tal:block tal:repeat="report_item report_item_list">\n
<tal:block metal:define-macro="make_report_item_table" tal:define="here python:report_item.getObject(portal_object); dummy python:report_item.pushReport(portal_object)">\n
<tal:block tal:condition="report_item/getTitle | report_item/getTranslatedTitle">\n
......@@ -118,17 +73,17 @@
<tal:block tal:condition="report_item/getTitle" tal:define="level report_item/getLevel">\n
<tal:block tal:condition="python: level == 1">\n
<table:table-cell table:style-name="report-title" tal:attributes="table:number-columns-spanned python:column_len" office:value-type=\'string\' table:number-rows-spanned=\'1\'>\n
<text:p tal:content="report_item/getTitle" i18n:translate="ui"></text:p>\n
<text:p tal:content="report_item/getTitle" i18n:translate="" i18n:domain="ui"></text:p>\n
</table:table-cell>\n
</tal:block>\n
<tal:block tal:condition="python: level == 2">\n
<table:table-cell table:style-name="report-title2" tal:attributes="table:number-columns-spanned python:column_len" office:value-type=\'string\' table:number-rows-spanned=\'1\'>\n
<text:p tal:content="report_item/getTitle" i18n:translate="ui"></text:p>\n
<text:p tal:content="report_item/getTitle" i18n:translate="" i18n:domain="ui"></text:p>\n
</table:table-cell>\n
</tal:block>\n
<tal:block tal:condition="python: level == 3">\n
<table:table-cell table:style-name="report-title3" tal:attributes="table:number-columns-spanned python:column_len" office:value-type=\'string\' table:number-rows-spanned=\'1\'>\n
<text:p tal:content="report_item/getTitle" i18n:translate="ui"></text:p>\n
<text:p tal:content="report_item/getTitle" i18n:translate="" i18n:domain="ui"></text:p>\n
</table:table-cell>\n
</tal:block>\n
</tal:block>\n
......@@ -153,10 +108,12 @@
</table:table>\n
</tal:block>\n
<tal:block tal:condition="python: sheet_per_reportsection == 1">\n
<tal:block tal:repeat="report_item python: here.Base_getReportSectionName(report_item_list)">\n
<table:table tal:attributes="table:name report_item/getTitle">\n
<tal:block metal:use-macro="here/report_view/macros/make_report_item_table"/>\n
</table:table> \n
<tal:block tal:repeat="report_item python: report_item_list">\n
<tal:block tal:condition="python: report_item.getFormId()">\n
<table:table tal:attributes="table:name report_item/getTitle">\n
<tal:block metal:use-macro="here/report_view/macros/make_report_item_table"/>\n
</table:table>\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
......@@ -182,7 +139,7 @@
</item>
<item>
<key> <string>ooo_stylesheet</string> </key>
<value> <string>OooTemplate_getStyleSheet</string> </value>
<value> <string>Base_getDynamicODSStyleSheet</string> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -92,7 +92,7 @@
<style:table-row-properties fo:break-before=\'auto\' style:use-optimal-row-height=\'false\' style:row-height=\'0.951cm\'/>\n
</style:style>\n
<style:style style:family=\'table-row\' style:name=\'ro7\'>\n
<style:table-row-properties fo:break-before=\'auto\' style:use-optimal-row-height=\'true\' style:row-height=\'0.522cm\'/>\n
<style:table-row-properties fo:break-before=\'auto\' style:use-optimal-row-height=\'true\' style:row-height=\'0.587cm\'/>\n
</style:style>\n
<style:style style:family=\'table-row\' style:name=\'ro8\'>\n
<style:table-row-properties fo:break-before=\'auto\' style:use-optimal-row-height=\'true\' style:row-height=\'0.531cm\'/>\n
......@@ -104,16 +104,13 @@
<style:table-row-properties fo:break-before=\'auto\' style:use-optimal-row-height=\'true\' style:row-height=\'0.538cm\'/>\n
</style:style>\n
<style:style style:family=\'table-row\' style:name=\'ro11\'>\n
<style:table-row-properties fo:break-before=\'auto\' style:use-optimal-row-height=\'true\' style:row-height=\'0.485cm\'/>\n
<style:table-row-properties fo:break-before=\'auto\' style:use-optimal-row-height=\'true\' style:row-height=\'0.453cm\'/>\n
</style:style>\n
<style:style style:family=\'table-row\' style:name=\'ro12\'>\n
<style:table-row-properties fo:break-before=\'auto\' style:use-optimal-row-height=\'true\' style:row-height=\'0.559cm\'/>\n
</style:style>\n
<style:style style:family=\'table-row\' style:name=\'ro13\'>\n
<style:table-row-properties fo:break-before=\'auto\' style:use-optimal-row-height=\'true\' style:row-height=\'0.616cm\'/>\n
</style:style>\n
<style:style style:family=\'table-row\' style:name=\'ro14\'>\n
<style:table-row-properties fo:break-before=\'auto\' style:use-optimal-row-height=\'true\' style:row-height=\'0.453cm\'/>\n
<style:style style:family=\'table-row\' style:name=\'ro13\'>\n
<style:table-row-properties fo:break-before=\'page\' style:use-optimal-row-height=\'true\' style:row-height=\'0.453cm\'/>\n
</style:style>\n
<style:style style:family=\'table\' style:name=\'ta1\' style:master-page-name=\'Default\'>\n
<style:table-properties style:writing-mode=\'lr-tb\' table:display=\'true\'/>\n
......
2007-08-30 rie
*improve name of field and file
*move global action into portal_properties
2007-08-29 rie
*improve naming
2007-08-24 rie
*add report function.
*add some style sheet
......
A prototype of a style creating OpenOffice's ods files.
\ No newline at end of file
The ERP5 Ods style used in order to creating OpenOffice's ods files and display Ods report.
\ No newline at end of file
39
\ No newline at end of file
51
\ No newline at end of file
portal_actions | export_ods
portal_actions | ods_report
\ No newline at end of file
portal_properties | ods_export
portal_properties | ods_report
\ No newline at end of file
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