"features/project/issues/issues.feature" did not exist on "09263719d536a3935c4b1d801472126ece28f283"
Commit ab79388f authored by Łukasz Nowak's avatar Łukasz Nowak

Avoid expanding invoice movements for purchases.

parent ca828c5d
......@@ -52,6 +52,13 @@
<key> <string>_body</string> </key>
<value> <string>movement = context\n
\n
if movement.getExplanationValue().getPortalType().startswith(\'Purchase\'):\n
# Vifib case: Purchase Business Process is minimalistic and does not care about\n
# invoice (and deeper parts of tree)\n
# But when this rule would get applied, it will try to create 0 simulation movements\n
# and code inside of BusinessProcess.py would raise "ValueError: A Business Process can not erase amounts"\n
# So just do not apply the rule in such case.\n
return False\n
source_section = movement.getSourceSection()\n
destination_section = movement.getDestinationSection()\n
if source_section == destination_section or source_section is None \\\n
......
55
\ No newline at end of file
56
\ 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