Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
erp5
Commits
482f2f41
Commit
482f2f41
authored
May 21, 2014
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hack: integreate float equivalence tester patch
parent
385d0e05
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
product/ERP5/Document/FloatEquivalenceTester.py
product/ERP5/Document/FloatEquivalenceTester.py
+7
-0
No files found.
product/ERP5/Document/FloatEquivalenceTester.py
View file @
482f2f41
...
...
@@ -94,6 +94,13 @@ class FloatEquivalenceTester(Predicate, EquivalenceTesterMixin):
# How to know if the other value is negligible or not ?
epsilon
=
abs
(
prevision_value
*
DEFAULT_PRECISION
)
if
decision_value
==
0.0
:
# A delivery quantity of 0 is an exceptional case that we cannot really
# handle with the current approach of delivery ratio.
decision_value
=
sum
([
m
.
getCorrectedQuantity
()
for
m
in
decision_movement
.
getDeliveryRelatedValueList
(
portal_type
=
'Simulation Movement'
)])
delta
=
abs
(
decision_value
-
prevision_value
)
# XXX we should use appropriate property sheets and getter methods
...
...
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