Commit 3ab9d0d8 authored by Yoshinori Okuji's avatar Yoshinori Okuji

initial import.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@549 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f140aeca
## Script (Python) "Delivery_mergeDeliveryList"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=form_id=''
##title=Merge deliveries into one
##
REQUEST=context.REQUEST
selection_name = REQUEST['selection_name']
object_list = context.portal_selections.getSelectionValueList(selection_name, context=context, REQUEST=REQUEST)
delivery_list = []
for o in object_list:
delivery_list.append(o)
if len(delivery_list) < 2:
ret_url = context.absolute_url() + '/' + form_id
qs = '?portal_status_message=Please+select+more+than+one+items.'
else:
ret_url = context.absolute_url() + '/' + form_id
qs = '?portal_status_message=Merged.'
context.portal_simulation.mergeDeliveryList(delivery_list)
return REQUEST.RESPONSE.redirect( ret_url + qs )
<?xml version="1.0"?>
<form>
<title>Merge the deliveries</title>
<row_length>4</row_length>
<name>Delivery_mergedDeliveryListForm</name>
<pt>form_view_dialog</pt>
<action>Delivery_mergeDeliveryList</action>
<method>POST</method>
<enctype></enctype>
<encoding>UTF-8</encoding>
<stored_encoding>ISO-8859-1</stored_encoding>
<unicode_mode>false</unicode_mode>
<groups>
<group>
<title>left</title>
<fields>
</fields>
</group>
<group>
<title>right</title>
<fields>
</fields>
</group>
<group>
<title>center</title>
<fields>
</fields>
</group>
<group>
<title>bottom</title>
<fields>
<field><id>listbox</id> <type>ListBox</type>
<values>
<all_columns type="list">[('id', 'R\xe9f\xe9rence'), ('portal_type', 'Type'), ('Title', 'Titre'), ('relative_url', "Chemin d'acc\xe8s"), ('Description', 'Description')]</all_columns>
<all_editable_columns type="list">[]</all_editable_columns>
<alternate_name></alternate_name>
<columns type="list">[('id', 'R\xe9f\xe9rence'), ('portal_type', 'Type'), ('Title', 'Titre'), ('relative_url', "Chemin d'acc\xe8s"), ('Description', 'Description')]</columns>
<css_class></css_class>
<default></default>
<default_params type="list">[('id', "''"), ('relative_url', "''"), ('portal_type', "''"), ('Description', "''")]</default_params>
<description></description>
<domain_root_list type="list">[]</domain_root_list>
<domain_tree type="int">0</domain_tree>
<editable type="int">1</editable>
<editable_columns type="list">[]</editable_columns>
<enabled type="int">1</enabled>
<external_validator></external_validator>
<global_attributes type="list">[]</global_attributes>
<hidden type="int">0</hidden>
<lines type="int">30</lines>
<list_action>folder_contents</list_action>
<list_method></list_method>
<meta_types type="list">[]</meta_types>
<portal_types type="list">[]</portal_types>
<report_root_list type="list">[]</report_root_list>
<report_tree type="int">0</report_tree>
<search type="int">0</search>
<search_columns type="list">[]</search_columns>
<select type="int">0</select>
<selection_name></selection_name>
<sort type="list">[('relative_url', 'relative_url')]</sort>
<stat_method></stat_method>
<title>Merged deliveries</title>
</values>
<tales>
<list_method>python:None</list_method>
<selection_name>here/REQUEST/form/selection_name</selection_name>
</tales>
<messages>
<message name="external_validator_failed">The input failed the external validator.</message>
</messages>
</field>
</fields>
</group>
<group>
<title>hidden</title>
<fields>
</fields>
</group>
</groups>
</form>
\ 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