Commit 5c9d9101 authored by Alexandre Boeglin's avatar Alexandre Boeglin

Invoicing Rule should only be applied if both source_section and...

Invoicing Rule should only be applied if both source_section and destination_section are defined on the simulation movement and are different from each other.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18468 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 91160071
......@@ -70,9 +70,16 @@
parent = movement.getParentValue()\n
if parent.getPortalType() == \'Applied Rule\':\n
parent_rule = parent.getSpecialiseValue()\n
if parent_rule.getPortalType() in [\'Order Rule\', \'Delivery Rule\']:\n
return True\n
return False\n
if parent_rule.getPortalType() not in [\'Order Rule\', \'Delivery Rule\']:\n
return False\n
\n
source_section = movement.getSourceSection()\n
destination_section = movement.getDestinationSection()\n
if source_section == destination_section or source_section is None \\\n
or destination_section is None:\n
return False\n
\n
return True\n
</string> </value>
</item>
<item>
......@@ -127,8 +134,11 @@ return False\n
<string>_getattr_</string>
<string>parent</string>
<string>parent_rule</string>
<string>True</string>
<string>False</string>
<string>source_section</string>
<string>destination_section</string>
<string>None</string>
<string>True</string>
</tuple>
</value>
</item>
......
10
\ No newline at end of file
11
\ 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