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
0
Merge Requests
0
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
Kasra Jamshidi
erp5
Commits
cd997726
Commit
cd997726
authored
Jul 07, 2011
by
Leonardo Rochael Almeida
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix AcceptSolver for category with multiple values
parent
408d9ab0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
product/ERP5/Document/AcceptSolver.py
product/ERP5/Document/AcceptSolver.py
+12
-1
No files found.
product/ERP5/Document/AcceptSolver.py
View file @
cd997726
...
...
@@ -74,8 +74,19 @@ class AcceptSolver(SolverMixin, ConfigurableMixin, XMLObject):
activate_kw
=
activate_kw
,
**
activate_kw
)
movement
=
simulation_movement
.
getDeliveryValue
()
value_dict
=
{}
base_category_set
=
set
(
movement
.
getBaseCategoryList
())
for
solved_property
in
solved_property_list
:
new_value
=
movement
.
getProperty
(
solved_property
)
if
solved_property
in
base_category_set
:
# XXX-Leo: Hack, the accept solver was 'accepting' only the first
# value of a category and discarding all others by using only
# movement.getProperty().
# 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
if
solved_property
==
'quantity'
:
new_quantity
=
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