Commit f1eb1007 authored by Mayoro Diagne's avatar Mayoro Diagne

2008-09-11: mayoro

- adding try except in the function getTitle() in DocumentationHelper_getDocumentationSectionList
- removing unused files:
* PortalTypeDocumentationHelper_getDocumentationSectionList
* DocumentationHelper_getERP5SiteDocumentationReportasODT

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23575 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0614f1a3
......@@ -66,11 +66,15 @@
<item>
<key> <string>_body</string> </key>
<value> <string>def getTitle(url=\'\'):\n
obj = context.getPortalObject().restrictedTraverse(url)\n
if obj is None:\n
return url.split(\'/\')[-1]\n
else:\n
return obj.getTitle()\n
try:\n
obj = context.getPortalObject().restrictedTraverse(url)\n
if hasattr(obj,\'getTitle\'):\n
return obj.getTitle()\n
else:\n
return url.split(\'/\')[-1]\n
except:\n
return url.split(\'/\')[-1]\n
\n
\n
from Products.ERP5Form.Report import ReportSection\n
REQUEST = context.REQUEST\n
......@@ -241,6 +245,12 @@ return result\n
<key> <string>id</string> </key>
<value> <string>DocumentationHelper_getDocumentationSectionList</string> </value>
</item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
......
......@@ -9,10 +9,22 @@
</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>
......@@ -69,6 +81,12 @@ return context.REQUEST.RESPONSE.redirect(\n
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>portal_skin=\'View\', business_template_list=()</string> </value>
......@@ -126,6 +144,12 @@ return context.REQUEST.RESPONSE.redirect(\n
<key> <string>id</string> </key>
<value> <string>DocumentationHelper_getERP5SiteDocumentationReport</string> </value>
</item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</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[
tab_url = context.absolute_url().split(\':\')\n
host = \'%s:%s\' % (tab_url[0],tab_url[1])\n
url = tab_url[2].split(\'/\')\n
new_url = \'/\'.join(url[:-1])\n
portal_url = \'%s:%s\' % (host,new_url)\n
uri = context.getPortalObject().getUrl()\n
return context.REQUEST.RESPONSE.redirect(\'%s/portal_classes/DocumentationHelper_viewReport?uri=%s&class_name=ERP5SiteDocumentationHelper&portal_skin=ODT\' % (portal_url, uri))\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>tab_url</string>
<string>_getitem_</string>
<string>host</string>
<string>url</string>
<string>new_url</string>
<string>portal_url</string>
<string>uri</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>DocumentationHelper_getERP5SiteDocumentationReportasODT</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -81,25 +81,25 @@
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<key> <string>bottom</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>center</string> </key>
<key> <string>center</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<key> <string>hidden</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>left</string> </key>
<key> <string>left</string> </key>
<value>
<list>
<string>your_portal_skin</string>
......@@ -107,7 +107,7 @@
</value>
</item>
<item>
<key> <string>right</string> </key>
<key> <string>right</string> </key>
<value>
<list>
<string>your_business_template_list</string>
......@@ -145,6 +145,12 @@
<key> <string>title</string> </key>
<value> <string>Documentation Helper</string> </value>
</item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
......
......@@ -178,6 +178,12 @@
</dictionary>
</value>
</item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
......
......@@ -182,6 +182,12 @@
</dictionary>
</value>
</item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</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>def getTitle(url=\'\'):\n
return url.split(\'/\')[-1]\n
\n
from Products.ERP5Form.Report import ReportSection\n
REQUEST = context.REQUEST\n
result = []\n
documentation_helper = context.getDocumentationHelper(REQUEST.get(\'class_name\'), REQUEST.get(\'uri\'))\n
section_list = documentation_helper.getSectionList()\n
result.append(\n
ReportSection(\n
path=context.getPortalObject().portal_classes.getRelativeUrl(),\n
level=1,\n
#title=getTitle(documentation_helper.getURI().split(\'.\')[-1]),\n
title = documentation_helper.getTitle(),\n
method_id=\'getDocumentationHelper\',\n
form_id=\'%s_view\' % documentation_helper.getClassName(),\n
param_list=[documentation_helper.getClassName(),\n
documentation_helper.getURI()],\n
listbox_display_mode=\'FlatListMode\')\n
)\n
\n
for section in section_list:\n
result.append(\n
ReportSection(\n
path=context.getPortalObject().portal_classes.getRelativeUrl(),\n
level=1,\n
title=section.title,\n
form_id=\'\')\n
)\n
for uri in section.getURIList():\n
result.append(\n
ReportSection(\n
path=context.getPortalObject().portal_classes.getRelativeUrl(),\n
level=2,\n
title=getTitle(uri.split(\'.\')[-1]),\n
method_id=\'getDocumentationHelper\',\n
form_id=\'%s_view\' % section.getClassName(),\n
param_list=[section.getClassName(),\n
uri],\n
listbox_display_mode=\'FlatListMode\')\n
)\n
\n
return result\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>getTitle</string>
<string>Products.ERP5Form.Report</string>
<string>ReportSection</string>
<string>_getattr_</string>
<string>context</string>
<string>REQUEST</string>
<string>result</string>
<string>documentation_helper</string>
<string>section_list</string>
<string>_getiter_</string>
<string>section</string>
<string>uri</string>
<string>_getitem_</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>PortalTypeDocumentationHelper_getDocumentationSectionList</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -71,7 +71,7 @@
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<key> <string>bottom</string> </key>
<value>
<list>
<string>listbox</string>
......@@ -87,7 +87,7 @@
</value>
</item>
<item>
<key> <string>center</string> </key>
<key> <string>center</string> </key>
<value>
<list>
<string>my_description</string>
......@@ -95,7 +95,7 @@
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<key> <string>hidden</string> </key>
<value>
<list>
<string>listbox_getters</string>
......@@ -104,7 +104,7 @@
</value>
</item>
<item>
<key> <string>left</string> </key>
<key> <string>left</string> </key>
<value>
<list>
<string>my_title</string>
......@@ -113,7 +113,7 @@
</value>
</item>
<item>
<key> <string>right</string> </key>
<key> <string>right</string> </key>
<value>
<list>
<string>my_class_name</string>
......@@ -148,6 +148,12 @@
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
......
......@@ -75,6 +75,12 @@
</dictionary>
</value>
</item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
......
......@@ -75,6 +75,12 @@
</dictionary>
</value>
</item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
......
......@@ -68,6 +68,12 @@
</dictionary>
</value>
</item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
......
......@@ -75,6 +75,12 @@
</dictionary>
</value>
</item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
......
......@@ -60,15 +60,15 @@
<value>
<dictionary>
<item>
<key> <string>columns</string> </key>
<key> <string>columns</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable_columns</string> </key>
<key> <string>editable_columns</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<key> <string>enabled</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
......@@ -82,7 +82,7 @@
<value> <string></string> </value>
</item>
<item>
<key> <string>list_method</string> </key>
<key> <string>list_method</string> </key>
<value> <string></string> </value>
</item>
<item>
......@@ -90,12 +90,18 @@
<value> <string></string> </value>
</item>
<item>
<key> <string>url_columns</string> </key>
<key> <string>url_columns</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
......
......@@ -133,6 +133,12 @@
</dictionary>
</value>
</item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
......
......@@ -133,6 +133,12 @@
</dictionary>
</value>
</item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
......
......@@ -184,6 +184,12 @@
</dictionary>
</value>
</item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
......
......@@ -184,6 +184,12 @@
</dictionary>
</value>
</item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
......
......@@ -76,6 +76,12 @@
</dictionary>
</value>
</item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
......
......@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.ERP5Form.ProxyField</string>
<string>ProxyField</string>
</tuple>
<none/>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
......@@ -71,6 +68,12 @@
</dictionary>
</value>
</item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
......
......@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.ERP5Form.ProxyField</string>
<string>ProxyField</string>
</tuple>
<none/>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
......@@ -71,6 +68,12 @@
</dictionary>
</value>
</item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
......
......@@ -75,6 +75,12 @@
</dictionary>
</value>
</item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
......
......@@ -75,6 +75,12 @@
</dictionary>
</value>
</item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
......
......@@ -75,6 +75,12 @@
</dictionary>
</value>
</item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
......
......@@ -70,6 +70,12 @@
</dictionary>
</value>
</item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
......
......@@ -71,7 +71,7 @@
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<key> <string>bottom</string> </key>
<value>
<list>
<string>listbox</string>
......@@ -81,13 +81,13 @@
</value>
</item>
<item>
<key> <string>center</string> </key>
<key> <string>center</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<key> <string>hidden</string> </key>
<value>
<list>
<string>listbox_getters</string>
......@@ -96,7 +96,7 @@
</value>
</item>
<item>
<key> <string>left</string> </key>
<key> <string>left</string> </key>
<value>
<list>
<string>my_title</string>
......@@ -105,7 +105,7 @@
</value>
</item>
<item>
<key> <string>right</string> </key>
<key> <string>right</string> </key>
<value>
<list/>
</value>
......@@ -137,6 +137,12 @@
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
......
......@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.ERP5Form.ProxyField</string>
<string>ProxyField</string>
</tuple>
<none/>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
......@@ -71,6 +68,12 @@
</dictionary>
</value>
</item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
......
......@@ -60,15 +60,15 @@
<value>
<dictionary>
<item>
<key> <string>columns</string> </key>
<key> <string>columns</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable_columns</string> </key>
<key> <string>editable_columns</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<key> <string>enabled</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
......@@ -82,7 +82,7 @@
<value> <string></string> </value>
</item>
<item>
<key> <string>list_method</string> </key>
<key> <string>list_method</string> </key>
<value> <string></string> </value>
</item>
<item>
......@@ -90,12 +90,18 @@
<value> <string></string> </value>
</item>
<item>
<key> <string>url_columns</string> </key>
<key> <string>url_columns</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
......
......@@ -133,6 +133,12 @@
</dictionary>
</value>
</item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
......
......@@ -133,6 +133,12 @@
</dictionary>
</value>
</item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
......
......@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.ERP5Form.ProxyField</string>
<string>ProxyField</string>
</tuple>
<none/>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
......@@ -71,6 +68,12 @@
</dictionary>
</value>
</item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
......
......@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.ERP5Form.ProxyField</string>
<string>ProxyField</string>
</tuple>
<none/>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
......@@ -71,6 +68,12 @@
</dictionary>
</value>
</item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
......
......@@ -70,6 +70,12 @@
</dictionary>
</value>
</item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
......
......@@ -136,6 +136,12 @@ else:\n
<key> <string>id</string> </key>
<value> <string>getAccessorMethodListboxVisibilityFromContext</string> </value>
</item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
......
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