Commit 148c0b87 authored by Łukasz Nowak's avatar Łukasz Nowak

Prepare for further updates.

Person_updateOpenOrder will be single point to manipulate open orders.
parent d348d245
<?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>portal = person.getPortalObject()\n
open_sale_order = portal.portal_catalog.getResultValue(\n
default_destination_section_uid=person.getUid(),\n
portal_type="Open Sale Order",\n
validation_state="validated")\n
\n
tag = \'%s_updateOpenOrder\' % person.getUid()\n
kw = {\'activate_kw\': {\'tag\': tag}}\n
if open_sale_order is None:\n
if portal.portal_activities.countMessageWithTag(tag) == 0:\n
open_order = portal.open_sale_order_module.newContent(\n
source=\'organisation_module/vifib_internet\',\n
source_section=\'organisation_module/vifib_internet\',\n
destination_section=person.getRelativeUrl(),\n
destination_decision=person.getRelativeUrl(),\n
destination=person.getRelativeUrl(),\n
price_currency=\'currency_module/EUR\',\n
specialise=\'sale_trade_condition_module/vifib_trade_condition\',\n
title="ViFiB Open Order", **kw)\n
open_order.order(**kw)\n
open_order.validate(**kw)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Person_updateOpenOrder</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -51,27 +51,7 @@
<item>
<key> <string>_body</string> </key>
<value> <string>person = state_change[\'object\']\n
portal = person.getPortalObject()\n
open_sale_order = portal.portal_catalog.getResultValue(\n
default_destination_section_uid=person.getUid(),\n
portal_type="Open Sale Order",\n
validation_state="validated")\n
\n
tag = \'%s_createOpenOrder\' % person.getUid()\n
kw = {\'activate_kw\': {\'tag\': tag}}\n
if open_sale_order is None:\n
if portal.portal_activities.countMessageWithTag(tag) == 0:\n
open_order = portal.open_sale_order_module.newContent(\n
source=\'organisation_module/vifib_internet\',\n
source_section=\'organisation_module/vifib_internet\',\n
destination_section=person.getRelativeUrl(),\n
destination_decision=person.getRelativeUrl(),\n
destination=person.getRelativeUrl(),\n
price_currency=\'currency_module/EUR\',\n
specialise=\'sale_trade_condition_module/vifib_trade_condition\',\n
title="ViFiB Open Order", **kw)\n
open_order.order(**kw)\n
open_order.validate(**kw)\n
person.Person_updateOpenOrder()\n
</string> </value>
</item>
<item>
......
599
\ No newline at end of file
600
\ 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