Commit fd796eb9 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

to support both new and legacy simulation tree.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32572 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6fa61518
...@@ -58,7 +58,12 @@ ...@@ -58,7 +58,12 @@
parent = movement.getParentValue()\n parent = movement.getParentValue()\n
if parent.getPortalType() == \'Applied Rule\':\n if parent.getPortalType() == \'Applied Rule\':\n
parent_rule = parent.getSpecialiseValue()\n parent_rule = parent.getSpecialiseValue()\n
if parent_rule.getPortalType() not in [\'Delivery Rule\', \'Order Rule\']:\n parent_rule_portal_type = parent_rule.getPortalType()\n
if parent_rule_portal_type not in [\'Order Rule\', \'Delivery Rule\', \'Delivering Simulation Rule\']:\n
return False\n
# XXX can we create tax rule for Production Order?\n
if parent_rule_portal_type in [\'Delivering Simulation Rule\',] and \\\n
parent.getParentValue().getParentValue().getSpecialiseValue().getPortalType() not in [\'Order Simulation Rule\']:\n
return False\n return False\n
\n \n
return True\n return True\n
...@@ -104,6 +109,7 @@ return True\n ...@@ -104,6 +109,7 @@ return True\n
<string>_getattr_</string> <string>_getattr_</string>
<string>parent</string> <string>parent</string>
<string>parent_rule</string> <string>parent_rule</string>
<string>parent_rule_portal_type</string>
<string>False</string> <string>False</string>
<string>True</string> <string>True</string>
</tuple> </tuple>
......
8 9
\ 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