Commit c7c0ce5e authored by Jérome Perrin's avatar Jérome Perrin

add jumps invoice -> order(s)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22756 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0217b3df
<?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_related_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>10.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Related Purchase Order</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 encoding="cdata"><![CDATA[
string:${object_url}/Invoice_jumpToOrder?packing_list_type=Sale%20Packing%20List&order_type=Sale%20Order
]]></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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_related_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>17.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Related Sale Order</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 encoding="cdata"><![CDATA[
string:${object_url}/Invoice_jumpToOrder?packing_list_type=Sale%20Packing%20List&order_type=Sale%20Order
]]></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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 order(s) this invoice was created from.\n
"""\n
portal = context.getPortalObject()\n
translateString = portal.Base_translateString\n
packing_list_list = context.getCausalityValueList(portal_type=packing_list_type,\n
checked_permission=\'View\')\n
related_order_uid_list = []\n
if packing_list_list:\n
if len(packing_list_list) == 1:\n
related_order_list = packing_list_list[0].getCausalityValueList(\n
portal_type=order_type,\n
checked_permission=\'View\')\n
related_order_uid_list = [o.getUid() for o in related_order_list]\n
if len(related_order_list) == 1:\n
related_object = related_order_list[0]\n
message = translateString(\n
# first, try to get a full translated message with portal types\n
"%s related to %s." % (related_object.getPortalType(), context.getPortalType()),\n
# if not found, fallback to generic translation\n
default = unicode(translateString(\'${this_portal_type} related to ${that_portal_type} : ${that_title}.\',\n
mapping={"this_portal_type" : related_object.getTranslatedPortalType(),\n
"that_portal_type" : context.getTranslatedPortalType(),\n
"that_title" : context.getTitleOrId() }), \'utf8\'))\n
return related_order_list[0].Base_redirect(\'view\',\n
keep_items=dict(portal_status_message=message))\n
else:\n
for packing_list in packing_list_list:\n
related_order_uid_list.extend(packing_list.getCausalityValueList(\n
portal_type=order_type,\n
checked_permission=\'View\'))\n
\n
if related_order_uid_list:\n
order_module = portal.getDefaultModule(order_type)\n
return order_module.Base_redirect(\'view\',\n
keep_items=dict(reset=1,\n
uid=related_order_uid_list))\n
\n
return context.Base_redirect(form_id,\n
keep_items=dict(portal_status_message=\n
translateString(\'No ${portal_type} Related.\',\n
mapping=dict(portal_type=order_type))))\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>packing_list_type, order_type, form_id=\'view\'</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>3</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>packing_list_type</string>
<string>order_type</string>
<string>form_id</string>
<string>_getattr_</string>
<string>context</string>
<string>portal</string>
<string>translateString</string>
<string>packing_list_list</string>
<string>related_order_uid_list</string>
<string>len</string>
<string>_getitem_</string>
<string>related_order_list</string>
<string>append</string>
<string>$append0</string>
<string>_getiter_</string>
<string>o</string>
<string>related_object</string>
<string>unicode</string>
<string>message</string>
<string>dict</string>
<string>packing_list</string>
<string>order_module</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<tuple>
<string>view</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Invoice_jumpToOrder</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
109
\ No newline at end of file
110
\ No newline at end of file
......@@ -5,6 +5,7 @@ Invoice Transaction Rule | divergence
Invoice Transaction Rule | view
Invoicing Rule | view
Purchase Invoice Transaction | apply_trade_condition
Purchase Invoice Transaction | jump_related_order
Purchase Invoice Transaction | jump_to_related_purchase_packing_list
Purchase Invoice Transaction | trade_condition_profile_view
Purchase Invoice Transaction | view_discount
......@@ -13,6 +14,7 @@ Purchase Invoice Transaction | view_tax
Sale Invoice Transaction | apply_trade_condition
Sale Invoice Transaction | invoice_item_list
Sale Invoice Transaction | invoice_print
Sale Invoice Transaction | jump_related_order
Sale Invoice Transaction | jump_to_related_sale_packing_list
Sale Invoice Transaction | payment_condition
Sale Invoice Transaction | trade_condition_profile_view
......
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