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 @@ ...@@ -3,21 +3,12 @@
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <global name="DeliveryBuilder" module="Products.ERP5Type.Document.DeliveryBuilder"/>
<string>Products.ERP5Type.Document.DeliveryBuilder</string> <tuple/>
<string>DeliveryBuilder</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>_count</string> </key> <key> <string>_count</string> </key>
<value> <value>
...@@ -30,12 +21,6 @@ ...@@ -30,12 +21,6 @@
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value> </value>
</item> </item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>_tree</string> </key> <key> <string>_tree</string> </key>
<value> <value>
...@@ -144,7 +129,7 @@ ...@@ -144,7 +129,7 @@
</item> </item>
<item> <item>
<key> <string>last_id</string> </key> <key> <string>last_id</string> </key>
<value> <string>1</string> </value> <value> <string>0</string> </value>
</item> </item>
<item> <item>
<key> <string>portal_type</string> </key> <key> <string>portal_type</string> </key>
...@@ -164,36 +149,18 @@ ...@@ -164,36 +149,18 @@
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Amortisation Transaction Builder</string> </value> <value> <string>Amortisation Transaction Builder</string> </value>
</item> </item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI="> <record id="2" aka="AAAAAAAAAAI=">
<pickle> <pickle>
<tuple> <global name="Length" module="BTrees.Length"/>
<tuple>
<string>BTrees.Length</string>
<string>Length</string>
</tuple>
<none/>
</tuple>
</pickle> </pickle>
<pickle> <int>0</int> </pickle> <pickle> <int>0</int> </pickle>
</record> </record>
<record id="3" aka="AAAAAAAAAAM="> <record id="3" aka="AAAAAAAAAAM=">
<pickle> <pickle>
<tuple> <global name="OOBTree" module="BTrees._OOBTree"/>
<tuple>
<string>BTrees.OOBTree</string>
<string>OOBTree</string>
</tuple>
<none/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<none/> <none/>
...@@ -201,13 +168,7 @@ ...@@ -201,13 +168,7 @@
</record> </record>
<record id="4" aka="AAAAAAAAAAQ="> <record id="4" aka="AAAAAAAAAAQ=">
<pickle> <pickle>
<tuple> <global name="OOBTree" module="BTrees._OOBTree"/>
<tuple>
<string>BTrees.OOBTree</string>
<string>OOBTree</string>
</tuple>
<none/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<none/> <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 @@ ...@@ -9,22 +9,10 @@
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>Script_magic</string> </key> <key> <string>Script_magic</string> </key>
<value> <int>3</int> </value> <value> <int>3</int> </value>
</item> </item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>_bind_names</string> </key> <key> <string>_bind_names</string> </key>
<value> <value>
...@@ -69,18 +57,24 @@ ...@@ -69,18 +57,24 @@
\n \n
# Set relative simulation movements profit_quantity to 0\n # Set relative simulation movements profit_quantity to 0\n
movement_list = transaction.getMovementList()\n movement_list = transaction.getMovementList()\n
all_simulation_movement_path_list = []\n
for movement in movement_list:\n for movement in movement_list:\n
simulation_movement_list = movement.getDeliveryRelatedValueList(portal_type=\'Simulation Movement\')\n simulation_movement_list = movement.getDeliveryRelatedValueList(portal_type=\'Simulation Movement\')\n
for simulation_movement in simulation_movement_list:\n for simulation_movement in simulation_movement_list:\n
simulation_movement.edit(profit_quantity=0)\n simulation_movement.edit(profit_quantity=0)\n
all_simulation_movement_path_list.extend([x.getPath() for x in simulation_movement_list])\n
\n \n
# Update from simulation, then adapt causality value\n # Update from simulation, then adapt causality value\n
builder = transaction.portal_deliveries.amortisation_transaction_builder\n builder = transaction.portal_deliveries.amortisation_transaction_builder\n
builder.updateFromSimulation(transaction.getRelativeUrl())\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 \n
# Automatic workflow\n # Automatic workflow\n
transaction.activate().updateCausalityState()\n transaction.activate(after_tag=tag).updateCausalityState()\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -89,18 +83,6 @@ transaction.activate().updateCausalityState()\n ...@@ -89,18 +83,6 @@ transaction.activate().updateCausalityState()\n
<none/> <none/>
</value> </value>
</item> </item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>state_change</string> </value> <value> <string>state_change</string> </value>
...@@ -134,11 +116,16 @@ transaction.activate().updateCausalityState()\n ...@@ -134,11 +116,16 @@ transaction.activate().updateCausalityState()\n
<string>transaction</string> <string>transaction</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>movement_list</string> <string>movement_list</string>
<string>all_simulation_movement_path_list</string>
<string>_getiter_</string> <string>_getiter_</string>
<string>movement</string> <string>movement</string>
<string>simulation_movement_list</string> <string>simulation_movement_list</string>
<string>simulation_movement</string> <string>simulation_movement</string>
<string>append</string>
<string>$append0</string>
<string>x</string>
<string>builder</string> <string>builder</string>
<string>tag</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
2008-09-16 Kazuhiko
* revise amortisation_transaction_builder using new API.
2008-08-28 yusei 2008-08-28 yusei
* Use Base_translateString or translateString instead of N_ for translation message. * Use Base_translateString or translateString instead of N_ for translation message.
......
149 150
\ No newline at end of file \ No newline at end of file
portal_deliveries/amortisation_transaction_builder portal_deliveries/amortisation_transaction_builder
portal_deliveries/amortisation_transaction_builder/**
portal_rules/default_amortisation_rule portal_rules/default_amortisation_rule
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