Commit 004d1dac authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

* simplify the script.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26129 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 60c85584
...@@ -54,20 +54,15 @@ ...@@ -54,20 +54,15 @@
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string># Get the list of attachments\n <value> <string># Get the list of attachments\n
attachment_pdf_list=[]\n portal_type_list = (\'PDF\', \'Image\',)\n
current_object = context.getObject()\n
\n \n
attachment_pdf_list = current_object.getAggregateValueList(\n aggregate_list = context.getAggregateValueList(\n
portal_type=(\'PDF\', \'Image\'))\n portal_type=portal_type_list)\n
\n \n
attachment_pdf_uid_list =[x.getUid() for x in attachment_pdf_list]\n sub_document_list = [x.getObject() for x in context.searchFolder(\n
portal_type=portal_type_list)]\n
\n \n
if not attachment_pdf_uid_list :\n return aggregate_list + sub_document_list\n
return []\n
result_list = [x.getObject() for x in current_object.searchFolder(\n
portal_type=(\'PDF\', \'Image\'))]\n
\n
return attachment_pdf_list + attachment_list\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -106,17 +101,15 @@ return attachment_pdf_list + attachment_list\n ...@@ -106,17 +101,15 @@ return attachment_pdf_list + attachment_list\n
<tuple> <tuple>
<string>lines_num</string> <string>lines_num</string>
<string>kw</string> <string>kw</string>
<string>attachment_pdf_list</string> <string>portal_type_list</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>current_object</string> <string>aggregate_list</string>
<string>append</string> <string>append</string>
<string>$append0</string> <string>$append0</string>
<string>_getiter_</string> <string>_getiter_</string>
<string>x</string> <string>x</string>
<string>attachment_pdf_uid_list</string> <string>sub_document_list</string>
<string>result_list</string>
<string>attachment_list</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
356 359
\ 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