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
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
Ekaterina
erp5
Commits
d6baf175
Commit
d6baf175
authored
Jun 29, 2011
by
Leonardo Rochael Almeida
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
un-hardcode the type list getAggregatedAmountList
parent
e53aff97
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
product/ERP5/Document/TradeModelSimulationRule.py
product/ERP5/Document/TradeModelSimulationRule.py
+9
-5
No files found.
product/ERP5/Document/TradeModelSimulationRule.py
View file @
d6baf175
...
@@ -97,12 +97,16 @@ class TradeModelRuleMovementGenerator(MovementGeneratorMixin):
...
@@ -97,12 +97,16 @@ class TradeModelRuleMovementGenerator(MovementGeneratorMixin):
def
_getInputMovementList
(
self
,
movement_list
=
None
,
rounding
=
False
):
def
_getInputMovementList
(
self
,
movement_list
=
None
,
rounding
=
False
):
simulation_movement
=
self
.
_applied_rule
.
getParentValue
()
simulation_movement
=
self
.
_applied_rule
.
getParentValue
()
portal
=
self
.
_applied_rule
.
getPortalObject
()
# List of types passed to simulation_movemet.asComposedDocument()
# it needs to include portal types of all 'amount_generator*' groups:
composition_type_list
=
(
portal
.
getPortalAmountGeneratorTypeList
()
+
portal
.
getPortalAmountGeneratorLineTypeList
()
+
portal
.
getPortalAmountGeneratorCellTypeList
())
amount_list
=
simulation_movement
.
getAggregatedAmountList
(
amount_generator_type_list
=
composition_type_list
)
input_movement
=
aq_base
(
simulation_movement
).
__of__
(
self
.
_applied_rule
)
input_movement
=
aq_base
(
simulation_movement
).
__of__
(
self
.
_applied_rule
)
for
amount
in
simulation_movement
.
getAggregatedAmountList
(
for
amount
in
amount_list
:
# XXX add a 'trade_amount_generator' group type
amount_generator_type_list
=
(
'Purchase Trade Condition'
,
'Sale Trade Condition'
,
'Trade Model Line'
)):
if
amount
.
getResource
():
if
amount
.
getResource
():
# FIXME: Is it the right way to have source/destination and other
# FIXME: Is it the right way to have source/destination and other
# non-Amount properties set on the generated movement ?
# non-Amount properties set on the generated movement ?
...
...
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