Commit 4b08ffb9 authored by Mayoro Diagne's avatar Mayoro Diagne

2009-12-29 mayoro

*return string uri and class_name instead of a list of uris and class_names

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31528 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6bc23e29
...@@ -53,18 +53,21 @@ ...@@ -53,18 +53,21 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>from Products.ERP5Form.Report import ReportSection\n <value> <string encoding="cdata"><![CDATA[
from Products.ERP5Form.Report import ReportSection\n
result = []\n result = []\n
request = context.REQUEST\n request = context.REQUEST\n
uri = request.get(\'uri\', None)\n uri = request.get(\'uri\', None)\n
if uri is None:\n if uri is None:\n
uri = request.get(\'field_your_uri\')\n uri = request.get(\'field_your_uri\')\n
if len(uri)>0:\n
uri = uri[0]\n
class_name = request.get(\'class_name\', None)\n class_name = request.get(\'class_name\', None)\n
if class_name is None:\n if class_name is None:\n
class_name = request.get(\'field_your_class_name\')\n class_name = request.get(\'field_your_class_name\')\n
context.log(\'uri\', uri)\n if len(class_name)>0:\n
context.log(\'class_name\', class_name)\n class_name = class_name[0]\n
\n
\n \n
result.append(\n result.append(\n
ReportSection(\n ReportSection(\n
...@@ -78,7 +81,9 @@ result.append(\n ...@@ -78,7 +81,9 @@ result.append(\n
)\n )\n
)\n )\n
return result\n return result\n
</string> </value>
]]></string> </value>
</item> </item>
<item> <item>
<key> <string>_code</string> </key> <key> <string>_code</string> </key>
...@@ -122,6 +127,8 @@ return result\n ...@@ -122,6 +127,8 @@ return result\n
<string>request</string> <string>request</string>
<string>None</string> <string>None</string>
<string>uri</string> <string>uri</string>
<string>len</string>
<string>_getitem_</string>
<string>class_name</string> <string>class_name</string>
<string>False</string> <string>False</string>
</tuple> </tuple>
......
2009-12-29 mayoro
*return string uri and class_name instead of a list of uris and class_names
2009-09-07 yusuke 2009-09-07 yusuke
* Replace ERP5Report to ERP5Form and ReportBox * Replace ERP5Report to ERP5Form and ReportBox
......
182 189
\ 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