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
amrani
erp5
Commits
ffc2ef30
Commit
ffc2ef30
authored
Jun 16, 2015
by
Sebastien Robin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mrp: add few comments to understand better 'cr' and 'pr'
parent
f8078f47
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
product/ERP5/Document/TransformationSimulationRule.py
product/ERP5/Document/TransformationSimulationRule.py
+3
-0
No files found.
product/ERP5/Document/TransformationSimulationRule.py
View file @
ffc2ef30
...
@@ -71,6 +71,7 @@ class TransformationSimulationRule(RuleMixin, MovementCollectionUpdaterMixin):
...
@@ -71,6 +71,7 @@ class TransformationSimulationRule(RuleMixin, MovementCollectionUpdaterMixin):
return
(
movement
.
getSource
()
is
None
or
movement
.
getDestination
()
is
None
)
return
(
movement
.
getSource
()
is
None
or
movement
.
getDestination
()
is
None
)
def
testTransformationSourcing
(
self
,
context
):
def
testTransformationSourcing
(
self
,
context
):
# make sure to ignore produced resources to keep consumed resources
if
context
.
getReference
().
split
(
'/'
,
1
)[
0
]
==
'pr'
:
if
context
.
getReference
().
split
(
'/'
,
1
)[
0
]
==
'pr'
:
return
False
return
False
# context consumes a resource: maybe sourcing is required.
# context consumes a resource: maybe sourcing is required.
...
@@ -156,8 +157,10 @@ class TransformationRuleMovementGenerator(MovementGeneratorMixin):
...
@@ -156,8 +157,10 @@ class TransformationRuleMovementGenerator(MovementGeneratorMixin):
return
movement
return
movement
for
phase
in
phase_set
:
for
phase
in
phase_set
:
for
previous
in
phase_dict
[
phase
]:
for
previous
in
phase_dict
[
phase
]:
# for consumed resource
yield
newIntermediateMovement
(
'cr/'
,
previous
,
quantity
=
cr_quantity
)
yield
newIntermediateMovement
(
'cr/'
,
previous
,
quantity
=
cr_quantity
)
if
phase
not
in
final_set
:
if
phase
not
in
final_set
:
# for produced resource
yield
newIntermediateMovement
(
'pr/'
,
phase
)
yield
newIntermediateMovement
(
'pr/'
,
phase
)
movement
=
newMovement
(
'pr'
)
movement
=
newMovement
(
'pr'
)
movement
.
_setTradePhaseList
(
final_set
)
movement
.
_setTradePhaseList
(
final_set
)
...
...
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