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 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
......@@ -70,7 +67,11 @@
<key> <string>_body</string> </key>
<value> <string>delivery = state_change[\'object\']\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
</string> </value>
</item>
......@@ -117,6 +118,10 @@ if delivery.getCausalityState() != \'draft\':\n
<string>state_change</string>
<string>_getitem_</string>
<string>delivery</string>
<string>getattr</string>
<string>None</string>
<string>getCausalityState</string>
<string>getSimulationState</string>
<string>_getattr_</string>
</tuple>
</value>
......
......@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
......@@ -81,8 +78,11 @@ delivery = delivery_movement.getExplanationValue()\n
# possible child of a Accounting Transaction\n
# in the Accounting Transaction Module\n
\n
if getattr(delivery, \'getCausalityState\', None) is not None and \\\n
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
</string> </value>
</item>
......@@ -133,6 +133,8 @@ if getattr(delivery, \'getCausalityState\', None) is not None and \\\n
<string>delivery</string>
<string>getattr</string>
<string>None</string>
<string>getCausalityState</string>
<string>getSimulationState</string>
</tuple>
</value>
</item>
......
......@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
......@@ -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
# getCausalityState will always be present. This getattr test needs to be removed once\n
# Payment Transaction is linked to a correct causality workflow.\n
if getattr(delivery, \'getCausalityState\', None) is not None \\\n
and 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.activate(\n
after_path_and_method_id=(delivery_movement.getPath(),\n
(\'recursiveImmediateReindexObject\', \'immediateReindexObject\'))).calculate()\n
......@@ -150,6 +150,8 @@ if delivery_movement is not None:\n
<string>None</string>
<string>delivery</string>
<string>getattr</string>
<string>getCausalityState</string>
<string>getSimulationState</string>
</tuple>
</value>
</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
* add rule_validation_workflow
......
564
\ No newline at end of file
565
\ 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