Commit d34e8c98 authored by Mayoro Diagne's avatar Mayoro Diagne

2008-09-20: mayoro

- Adding list of property sheets on portal_types in ODT mode
- Displaying list of used property sheet in appendix and source codes of those property sheets

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23720 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a6e77b0b
...@@ -71,6 +71,9 @@ ...@@ -71,6 +71,9 @@
except AttributeError:\n except AttributeError:\n
return url.split(\'/\')[-1]\n return url.split(\'/\')[-1]\n
\n \n
def compareFileName(a, b):\n
return cmp(a.split(\'/\')[-1], b.split(\'/\')[-1])\n
\n
\n \n
from Products.ERP5Form.Report import ReportSection\n from Products.ERP5Form.Report import ReportSection\n
REQUEST = context.REQUEST\n REQUEST = context.REQUEST\n
...@@ -197,7 +200,7 @@ if portal_skin is not None and portal_skin=="ODT":\n ...@@ -197,7 +200,7 @@ if portal_skin is not None and portal_skin=="ODT":\n
form_id=\'\')\n form_id=\'\')\n
)\n )\n
classmethod = dict().fromkeys([x for x in class_methods_list]).keys()\n classmethod = dict().fromkeys([x for x in class_methods_list]).keys()\n
propertysheet = dict().fromkeys([x.split(\'/\')[-1].split(\'.\')[0] for x in property_sheets_list]).keys()\n propertysheet = dict(zip([x.split(\'/\')[-1] for x in property_sheets_list],property_sheets_list))\n
result.append(\n result.append(\n
ReportSection(\n ReportSection(\n
level=3,\n level=3,\n
...@@ -220,10 +223,23 @@ if portal_skin is not None and portal_skin=="ODT":\n ...@@ -220,10 +223,23 @@ if portal_skin is not None and portal_skin=="ODT":\n
result.append(\n result.append(\n
ReportSection(\n ReportSection(\n
form_id=\'PortalTypeDocumentationHelperAppendixPropertySheet_view\',\n form_id=\'PortalTypeDocumentationHelperAppendixPropertySheet_view\',\n
selection_params=dict(property_sheet_list=propertysheet, obj=uri_object),\n selection_params=dict(property_sheet_list=propertysheet.keys(), obj=uri_object),\n
selection_name=\'property_sheet_selection\',\n selection_name=\'property_sheet_selection\',\n
listbox_display_mode=\'FlatListMode\')\n listbox_display_mode=\'FlatListMode\')\n
)\n )\n
class_name = \'PortalTypePropertySheetDocumentationHelper\'\n
propertysheets = propertysheet.values()\n
propertysheets.sort(compareFileName)\n
for uri in propertysheets:\n
result.append(\n
ReportSection(\n
path=context.getPortalObject().portal_classes.getRelativeUrl(),\n
method_id=\'getDocumentationHelper\',\n
form_id=\'%s_view\' % class_name,\n
param_list=[class_name,\n
uri],\n
listbox_display_mode=\'FlatListMode\')\n
)\n
return result\n return result\n
</string> </value> </string> </value>
</item> </item>
...@@ -268,6 +284,7 @@ return result\n ...@@ -268,6 +284,7 @@ return result\n
<value> <value>
<tuple> <tuple>
<string>getTitle</string> <string>getTitle</string>
<string>compareFileName</string>
<string>Products.ERP5Form.Report</string> <string>Products.ERP5Form.Report</string>
<string>ReportSection</string> <string>ReportSection</string>
<string>_getattr_</string> <string>_getattr_</string>
...@@ -300,7 +317,9 @@ return result\n ...@@ -300,7 +317,9 @@ return result\n
<string>$append0</string> <string>$append0</string>
<string>x</string> <string>x</string>
<string>classmethod</string> <string>classmethod</string>
<string>zip</string>
<string>propertysheet</string> <string>propertysheet</string>
<string>propertysheets</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
<string>list_method</string> <string>list_method</string>
<string>selection_name</string> <string>selection_name</string>
<string>url_columns</string> <string>url_columns</string>
<string>enabled</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -69,12 +68,6 @@ ...@@ -69,12 +68,6 @@
<key> <string>description</string> </key> <key> <string>description</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>enabled</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item> <item>
<key> <string>field_id</string> </key> <key> <string>field_id</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -131,10 +124,6 @@ ...@@ -131,10 +124,6 @@
<key> <string>description</string> </key> <key> <string>description</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>enabled</string> </key>
<value> <int>0</int> </value>
</item>
<item> <item>
<key> <string>field_id</string> </key> <key> <string>field_id</string> </key>
<value> <string>my_view_mode_listbox</string> </value> <value> <string>my_view_mode_listbox</string> </value>
...@@ -146,7 +135,7 @@ ...@@ -146,7 +135,7 @@
<item> <item>
<key> <string>list_method</string> </key> <key> <string>list_method</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
...@@ -179,22 +168,6 @@ ...@@ -179,22 +168,6 @@
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI="> <record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here. PortalTypeDocumentationHeper_getListboxVisibilityFromContext()</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle> <pickle>
<tuple> <tuple>
<global name="Method" module="Products.Formulator.MethodField"/> <global name="Method" module="Products.Formulator.MethodField"/>
......
104 107
\ No newline at end of file \ 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