Commit 52712d0d authored by Rafael Monnerat's avatar Rafael Monnerat

Added jump to Related Orders

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@21327 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 583d9e4c
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_jump</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>jump_to_order</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>6.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Related Order(s)</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="Expression" module="Products.CMFCore.Expression"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/Item_jumpToOrder</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -338,6 +338,10 @@ ...@@ -338,6 +338,10 @@
<string>title</string> <string>title</string>
<string>Title</string> <string>Title</string>
</tuple> </tuple>
<tuple>
<string>reference</string>
<string>Reference</string>
</tuple>
<tuple> <tuple>
<string>portal_type</string> <string>portal_type</string>
<string>Portal Type</string> <string>Portal Type</string>
...@@ -346,6 +350,22 @@ ...@@ -346,6 +350,22 @@
<string>description</string> <string>description</string>
<string>Description</string> <string>Description</string>
</tuple> </tuple>
<tuple>
<string>source_title</string>
<string>Source</string>
</tuple>
<tuple>
<string>source_section_title</string>
<string>Source Section</string>
</tuple>
<tuple>
<string>destination_title</string>
<string>Destination</string>
</tuple>
<tuple>
<string>destination_section_title</string>
<string>Destination Section</string>
</tuple>
<tuple> <tuple>
<string>start_date</string> <string>start_date</string>
<string>Start Date</string> <string>Start Date</string>
...@@ -510,6 +530,10 @@ ...@@ -510,6 +530,10 @@
<string>id</string> <string>id</string>
<string>id</string> <string>id</string>
</tuple> </tuple>
<tuple>
<string>reference</string>
<string>Reference</string>
</tuple>
<tuple> <tuple>
<string>start_date</string> <string>start_date</string>
<string>start_date</string> <string>start_date</string>
......
<?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># Jump to the deliveries related to current item\n
selection_uid_list = []\n
portal_type_list = context.getPortalOrderMovementTypeList()\n
search_list = context.getAggregateRelatedValueList(portal_type=portal_type_list)\n
for order in search_list:\n
delivery = order.getParentValue()\n
delivery_uid = delivery.getUid()\n
if delivery_uid not in selection_uid_list:\n
selection_uid_list.append(delivery_uid)\n
\n
request=context.REQUEST\n
if len(selection_uid_list) != 0 : \n
kw = {\'uid\': selection_uid_list}\n
context.portal_selections.setSelectionParamsFor(\'Item_jumpToDeliveryForm\', kw)\n
#request.set(\'object_uid\', context.getUid())\n
request.set(\'uids\', selection_uid_list)\n
return context.Item_jumpToDeliveryForm(\n
uids=selection_uid_list, REQUEST=request)\n
\n
redirect_url = \'%s/view?%s\' % (context.getPath(),\n
\'portal_status_message=No+Related+Order+For+Current+Item\')\n
return context.REQUEST[ \'RESPONSE\' ].redirect(redirect_url)\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>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>**kw</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>kw</string>
<string>selection_uid_list</string>
<string>_getattr_</string>
<string>context</string>
<string>portal_type_list</string>
<string>search_list</string>
<string>_getiter_</string>
<string>order</string>
<string>delivery</string>
<string>delivery_uid</string>
<string>request</string>
<string>len</string>
<string>redirect_url</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>Item_jumpToOrder</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
42 44
\ No newline at end of file \ No newline at end of file
...@@ -5,6 +5,7 @@ Item Module | view ...@@ -5,6 +5,7 @@ Item Module | view
Item | create_order Item | create_order
Item | delivery_jump Item | delivery_jump
Item | jump_to_invoice Item | jump_to_invoice
Item | jump_to_order
Item | tracking_list Item | tracking_list
Item | view Item | view
Purchase Order Line | item_creation Purchase Order Line | item_creation
......
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