Commit f7002f02 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

2008-09-16 Kazuhiko

* revise amortisation_transaction_builder using new API.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23651 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6855f183
......@@ -3,21 +3,12 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.ERP5Type.Document.DeliveryBuilder</string>
<string>DeliveryBuilder</string>
</tuple>
<none/>
<global name="DeliveryBuilder" module="Products.ERP5Type.Document.DeliveryBuilder"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_count</string> </key>
<value>
......@@ -30,12 +21,6 @@
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
......@@ -144,7 +129,7 @@
</item>
<item>
<key> <string>last_id</string> </key>
<value> <string>1</string> </value>
<value> <string>0</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
......@@ -164,36 +149,18 @@
<key> <string>title</string> </key>
<value> <string>Amortisation Transaction Builder</string> </value>
</item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>BTrees.Length</string>
<string>Length</string>
</tuple>
<none/>
</tuple>
<global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<tuple>
<string>BTrees.OOBTree</string>
<string>OOBTree</string>
</tuple>
<none/>
</tuple>
<global name="OOBTree" module="BTrees._OOBTree"/>
</pickle>
<pickle>
<none/>
......@@ -201,13 +168,7 @@
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<tuple>
<tuple>
<string>BTrees.OOBTree</string>
<string>OOBTree</string>
</tuple>
<none/>
</tuple>
<global name="OOBTree" module="BTrees._OOBTree"/>
</pickle>
<pickle>
<none/>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="CategoryMovementGroup" module="Products.ERP5Type.Document.CategoryMovementGroup"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>divergence_scope/category</string>
<string>collect_order_group/delivery</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>category_movement_group_on_delivery</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
<value> <int>2</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category Movement Group</string> </value>
</item>
<item>
<key> <string>tested_property</string> </key>
<value>
<tuple>
<string>source_section</string>
<string>destination_section</string>
<string>resource</string>
</tuple>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>category_movement_group_on_delivery</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="CategoryMovementGroup" module="Products.ERP5Type.Document.CategoryMovementGroup"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>divergence_scope/category</string>
<string>collect_order_group/line</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>category_movement_group_on_line</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category Movement Group</string> </value>
</item>
<item>
<key> <string>tested_property</string> </key>
<value>
<tuple>
<string>source</string>
<string>destination</string>
</tuple>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>category_movement_group_on_line</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PropertyMovementGroup" module="Products.ERP5Type.Document.PropertyMovementGroup"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>divergence_scope/property</string>
<string>collect_order_group/delivery</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>property_movement_group_on_delivery</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Property Movement Group</string> </value>
</item>
<item>
<key> <string>tested_property</string> </key>
<value>
<tuple>
<string>start_date</string>
<string>stop_date</string>
</tuple>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>property_movement_group_on_delivery</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="QuantitySignMovementGroup" module="Products.ERP5Type.Document.QuantitySignMovementGroup"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>collect_order_group/line</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>quantity_sign_movement_group_on_line</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
<value> <int>2</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Quantity Sign Movement Group</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>quantity_sign_movement_group_on_line</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -9,22 +9,10 @@
</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>
......@@ -69,18 +57,24 @@
\n
# Set relative simulation movements profit_quantity to 0\n
movement_list = transaction.getMovementList()\n
all_simulation_movement_path_list = []\n
for movement in movement_list:\n
simulation_movement_list = movement.getDeliveryRelatedValueList(portal_type=\'Simulation Movement\')\n
for simulation_movement in simulation_movement_list:\n
simulation_movement.edit(profit_quantity=0)\n
all_simulation_movement_path_list.extend([x.getPath() for x in simulation_movement_list])\n
\n
# Update from simulation, then adapt causality value\n
builder = transaction.portal_deliveries.amortisation_transaction_builder\n
builder.updateFromSimulation(transaction.getRelativeUrl())\n
transaction.AmortisationTransaction_afterBuild()\n
tag = \'%s_afterBuild\' % transaction.getRelativeUrl()\n
transaction.activate(tag=tag,\n
after_path_and_method_id=(\n
all_simulation_movement_path_list,\n
(\'immediateReindexObject\', \'recursiveImmediateReindexObject\'))).AmortisationTransaction_afterBuild()\n
\n
# Automatic workflow\n
transaction.activate().updateCausalityState()\n
transaction.activate(after_tag=tag).updateCausalityState()\n
</string> </value>
</item>
<item>
......@@ -89,18 +83,6 @@ transaction.activate().updateCausalityState()\n
<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>state_change</string> </value>
......@@ -134,11 +116,16 @@ transaction.activate().updateCausalityState()\n
<string>transaction</string>
<string>_getattr_</string>
<string>movement_list</string>
<string>all_simulation_movement_path_list</string>
<string>_getiter_</string>
<string>movement</string>
<string>simulation_movement_list</string>
<string>simulation_movement</string>
<string>append</string>
<string>$append0</string>
<string>x</string>
<string>builder</string>
<string>tag</string>
</tuple>
</value>
</item>
......
2008-09-16 Kazuhiko
* revise amortisation_transaction_builder using new API.
2008-08-28 yusei
* Use Base_translateString or translateString instead of N_ for translation message.
......
149
\ No newline at end of file
150
\ No newline at end of file
portal_deliveries/amortisation_transaction_builder
portal_deliveries/amortisation_transaction_builder/**
portal_rules/default_amortisation_rule
portal_rules/default_amortisation_rule/**
\ 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