Commit 7e9f94df authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

2007-11-14 kazuhiko

* check if simulation state is draft or not before calling 'calculate' workflow method otherwise causality state can remain calculating.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17571 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e5ff17a8
...@@ -3,11 +3,8 @@ ...@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<string>Products.PythonScripts.PythonScript</string> <tuple/>
<string>PythonScript</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
...@@ -70,7 +67,11 @@ ...@@ -70,7 +67,11 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>delivery = state_change[\'object\']\n <value> <string>delivery = state_change[\'object\']\n
\n \n
if delivery.getCausalityState() != \'draft\':\n getCausalityState = getattr(delivery, \'getCausalityState\', None)\n
getSimulationState = getattr(delivery, \'getSimulationState\', None)\n
\n
if getCausalityState is not None and getCausalityState() != \'draft\' and \\\n
getSimulationState is not None and getSimulationState() != \'draft\':\n
delivery.calculate()\n delivery.calculate()\n
</string> </value> </string> </value>
</item> </item>
...@@ -117,6 +118,10 @@ if delivery.getCausalityState() != \'draft\':\n ...@@ -117,6 +118,10 @@ if delivery.getCausalityState() != \'draft\':\n
<string>state_change</string> <string>state_change</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>delivery</string> <string>delivery</string>
<string>getattr</string>
<string>None</string>
<string>getCausalityState</string>
<string>getSimulationState</string>
<string>_getattr_</string> <string>_getattr_</string>
</tuple> </tuple>
</value> </value>
......
...@@ -3,11 +3,8 @@ ...@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<string>Products.PythonScripts.PythonScript</string> <tuple/>
<string>PythonScript</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
...@@ -81,8 +78,11 @@ delivery = delivery_movement.getExplanationValue()\n ...@@ -81,8 +78,11 @@ delivery = delivery_movement.getExplanationValue()\n
# possible child of a Accounting Transaction\n # possible child of a Accounting Transaction\n
# in the Accounting Transaction Module\n # in the Accounting Transaction Module\n
\n \n
if getattr(delivery, \'getCausalityState\', None) is not None and \\\n getCausalityState = getattr(delivery, \'getCausalityState\', None)\n
delivery.getCausalityState() != \'draft\':\n getSimulationState = getattr(delivery, \'getSimulationState\', None)\n
\n
if getCausalityState is not None and getCausalityState() != \'draft\' and \\\n
getSimulationState is not None and getSimulationState() != \'draft\':\n
delivery.calculate()\n delivery.calculate()\n
</string> </value> </string> </value>
</item> </item>
...@@ -133,6 +133,8 @@ if getattr(delivery, \'getCausalityState\', None) is not None and \\\n ...@@ -133,6 +133,8 @@ if getattr(delivery, \'getCausalityState\', None) is not None and \\\n
<string>delivery</string> <string>delivery</string>
<string>getattr</string> <string>getattr</string>
<string>None</string> <string>None</string>
<string>getCausalityState</string>
<string>getSimulationState</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -3,11 +3,8 @@ ...@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<string>Products.PythonScripts.PythonScript</string> <tuple/>
<string>PythonScript</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
...@@ -77,8 +74,11 @@ if delivery_movement is not None:\n ...@@ -77,8 +74,11 @@ if delivery_movement is not None:\n
# Because Payment Transaction does not have a causality workflow, we cannot assume that\n # Because Payment Transaction does not have a causality workflow, we cannot assume that\n
# getCausalityState will always be present. This getattr test needs to be removed once\n # getCausalityState will always be present. This getattr test needs to be removed once\n
# Payment Transaction is linked to a correct causality workflow.\n # Payment Transaction is linked to a correct causality workflow.\n
if getattr(delivery, \'getCausalityState\', None) is not None \\\n getCausalityState = getattr(delivery, \'getCausalityState\', None)\n
and delivery.getCausalityState() != \'draft\':\n getSimulationState = getattr(delivery, \'getSimulationState\', None)\n
\n
if getCausalityState is not None and getCausalityState() != \'draft\' and \\\n
getSimulationState is not None and getSimulationState() != \'draft\':\n
delivery.activate(\n delivery.activate(\n
after_path_and_method_id=(delivery_movement.getPath(),\n after_path_and_method_id=(delivery_movement.getPath(),\n
(\'recursiveImmediateReindexObject\', \'immediateReindexObject\'))).calculate()\n (\'recursiveImmediateReindexObject\', \'immediateReindexObject\'))).calculate()\n
...@@ -150,6 +150,8 @@ if delivery_movement is not None:\n ...@@ -150,6 +150,8 @@ if delivery_movement is not None:\n
<string>None</string> <string>None</string>
<string>delivery</string> <string>delivery</string>
<string>getattr</string> <string>getattr</string>
<string>getCausalityState</string>
<string>getSimulationState</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
2007-11-14 kazuhiko
* check if simulation state is draft or not before calling 'calculate' workflow method otherwise causality state can remain calculating.
2007-11-05 alex 2007-11-05 alex
* add rule_validation_workflow * add rule_validation_workflow
......
564 565
\ No newline at end of file \ 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