Commit 7ab1bb4c authored by Łukasz Nowak's avatar Łukasz Nowak

Drop not needed interaction.

parent 7e404a2b
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="InteractionDefinition" module="Products.ERP5.Interaction"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>activate_script_name</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>after_script_name</string> </key>
<value>
<list>
<string>Delivery_assertCustomTradeConditionAndOpenOrder</string>
</list>
</value>
</item>
<item>
<key> <string>before_commit_script_name</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>guard</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>assert_open_order</string> </value>
</item>
<item>
<key> <string>method_id</string> </key>
<value>
<list>
<string>order</string>
<string>confirm</string>
<string>plan</string>
</list>
</value>
</item>
<item>
<key> <string>once_per_transaction</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>portal_type_filter</string> </key>
<value>
<list>
<string>Sale Order</string>
</list>
</value>
</item>
<item>
<key> <string>script_name</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>temporary_document_disallowed</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>2</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </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>from Products.ERP5Type.Log import log\n
order = state_change[\'object\']\n
portal = order.getPortalObject()\n
\n
vifib_trade_condition = \'sale_trade_condition_module/vifib_trade_condition\'\n
if not order.hasSpecialise():
order.edit(specialise=vifib_trade_condition)
\n
# ### STEP 1: does this order have a client-specific Trade Condition\n
# trade_condition = order.getSpecialiseValue(portal_type="Sale Trade Condition")\n
# custom_trade_condition = None\n
# if trade_condition is not None:\n
# if trade_condition.getDestinationSection() == order.getDestinationSection():\n
# # The client in this trade condition is the client of the order\n
# custom_trade_condition = trade_condition\n
# \n
# if custom_trade_condition is None:\n
# # If no trade condition or generic trade condition\n
# # try to find existing trade condition\n
# trade_condition_list = portal.portal_catalog(\n
# destination_section_relative_url=order.getDestinationSection(),\n
# validation_state="validated",\n
# specialise_relative_url=vifib_trade_condition,\n
# portal_type=\'Sale Trade Condition\')\n
# if len(trade_condition_list):\n
# custom_trade_condition = trade_condition_list[0].getObject()\n
# \n
# if custom_trade_condition is None:\n
# # nothing found then create a new custom trade condition\n
# custom_trade_condition = portal.sale_trade_condition_module.newContent(specialise=vifib_trade_condition,\n
# destination_section=order.getDestinationSection(),\n
# title="ViFiB Custom Conditions",\n
# portal_type=\'Sale Trade Condition\')\n
# \n
# if custom_trade_condition is None:\n
# raise ValueError(\'It was impossible to generate custom trade condition.\')\n
# if order.getSpecialise(portal_type="Sale Trade Condition") != custom_trade_condition.getRelativeUrl():\n
# order.setSpecialiseValue(custom_trade_condition)\n
# \n
# if portal.portal_workflow.isTransitionPossible(custom_trade_condition, \'validate\'):\n
# custom_trade_condition.validate()\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>state_change, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Delivery_assertCustomTradeConditionAndOpenOrder</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
168
\ No newline at end of file
169
\ 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