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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Cédric Le Ninivin
erp5
Commits
b04c0512
Commit
b04c0512
authored
Nov 08, 2017
by
Cédric Le Ninivin
Committed by
Cédric Le Ninivin
May 29, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AcceptSolver: Update property value with decision_value from DivergenceMessage
parent
1afc9c8b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
13 deletions
+6
-13
bt5/erp5_simulation/DocumentTemplateItem/portal_components/document.erp5.AcceptSolver.py
...plateItem/portal_components/document.erp5.AcceptSolver.py
+6
-13
No files found.
bt5/erp5_simulation/DocumentTemplateItem/portal_components/document.erp5.AcceptSolver.py
View file @
b04c0512
...
@@ -57,19 +57,12 @@ class AcceptSolver(ConfigurablePropertySolverMixin):
...
@@ -57,19 +57,12 @@ class AcceptSolver(ConfigurablePropertySolverMixin):
for
simulation_movement
in
self
.
getDeliveryValueList
():
for
simulation_movement
in
self
.
getDeliveryValueList
():
movement
=
simulation_movement
.
getDeliveryValue
()
movement
=
simulation_movement
.
getDeliveryValue
()
value_dict
=
{}
value_dict
=
{}
base_category_set
=
set
(
movement
.
getBaseCategoryList
())
divergence_list
=
movement
.
getDivergenceList
()
for
solved_property
in
solved_property_list
:
for
divergence
in
divergence_list
:
if
solved_property
in
base_category_set
:
solved_property
=
divergence
.
getProperty
(
'tested_property'
)
# XXX-Leo: Hack, the accept solver was 'accepting' only the first
if
solved_property
not
in
solved_property_list
:
# value of a category and discarding all others by using only
continue
# movement.getProperty().
new_value
=
divergence
.
getProperty
(
'decision_value'
)
# A proper fix would perhaps be to use .getPropertyList() always
# (and use .setPropertyList()), but we need to do property
# mapping on simulation and there is no
# simulation_movement.setMappedPropertyList().
new_value
=
movement
.
getPropertyList
(
solved_property
)
else
:
new_value
=
movement
.
getProperty
(
solved_property
)
# XXX hard coded
# XXX hard coded
if
solved_property
==
'quantity'
:
if
solved_property
==
'quantity'
:
new_value
*=
simulation_movement
.
getDeliveryRatio
()
new_value
*=
simulation_movement
.
getDeliveryRatio
()
...
...
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