Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
slapos.core
Commits
b874179d
Commit
b874179d
authored
Feb 27, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify condition.
parent
6eeb47e0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
8 deletions
+7
-8
master/bt5/vifib_base/SkinTemplateItem/portal_skins/vifib_simulation/SimulationMovement_testInvoiceSimulationRule.xml
...mulation/SimulationMovement_testInvoiceSimulationRule.xml
+6
-7
master/bt5/vifib_base/bt/revision
master/bt5/vifib_base/bt/revision
+1
-1
No files found.
master/bt5/vifib_base/SkinTemplateItem/portal_skins/vifib_simulation/SimulationMovement_testInvoiceSimulationRule.xml
View file @
b874179d
...
...
@@ -52,20 +52,19 @@
<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
business_link = movement.getCausalityValue(portal_type=\'Business Link\')\n
\n
if len(business_link.getParentValue().getBusinessLinkValueList(trade_phase=rule.getTradePhaseList())) == 0:\n
# If Business Process does not define invoicing do not apply\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
if movement.getSimulationState() in
movement.getCausalityValue(portal_type=\'Business Link\')
.getCompletedStateList():\n
if movement.getSimulationState() in
business_link
.getCompletedStateList():\n
return True\n
\n
return False\n
...
...
master/bt5/vifib_base/bt/revision
View file @
b874179d
394
\ No newline at end of file
395
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment