Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
dream
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
dream
Commits
98e41944
Commit
98e41944
authored
Sep 29, 2014
by
Ioannis Papagiannopoulos
Committed by
Jérome Perrin
Feb 04, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correction of orderComponents creation (parentOrder provided correctly)
parent
9a4ff50d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
dream/simulation/LineGenerationJSON.py
dream/simulation/LineGenerationJSON.py
+5
-4
No files found.
dream/simulation/LineGenerationJSON.py
View file @
98e41944
...
...
@@ -379,7 +379,6 @@ def createWIP():
wip
=
element
.
get
(
'wip'
,
[])
from
dream.simulation.OrderDesign
import
OrderDesign
for
entity
in
wip
:
entityOrder
=
None
# variable to hold the parent order of the WIP
# if there is BOM defined
if
bom
:
# and production orders in it
...
...
@@ -390,7 +389,6 @@ def createWIP():
for
componentDict
in
order
.
componentsList
:
# if the entity has no parent order the following control will not be performed
if
entity
[
'id'
]
==
componentDict
[
'id'
]:
entityOrder
=
order
# the parent order of the entity
entityCurrentSeq
=
int
(
entity
[
'sequence'
])
# the current seq number of the entity's route
ind
=
0
# holder of the route index corresponding to the entityCurrentSeq
solution
=
False
# flag to signal that the route step is found
...
...
@@ -411,6 +409,7 @@ def createWIP():
entity
=
dict
(
componentDict
)
# copy the entity dict
entity
.
pop
(
'route'
)
# remove the old route
entity
[
'route'
]
=
entityRoute
# and hold the new one without the previous steps
entity
[
'order'
]
=
order
.
id
break
entityClass
=
entity
.
get
(
'_class'
,
None
)
...
...
@@ -420,8 +419,10 @@ def createWIP():
from
dream.simulation.Entity
import
Entity
if
issubclass
(
entityType
,
Entity
)
and
(
not
entityClass
==
'Dream.Order'
):
# if orders are provided separately (BOM) provide the parent order as argument
if
entityOrder
:
entity
=
entityType
(
order
=
order
,
**
inputDict
)
if
entity
.
get
(
'order'
,
None
):
entityOrder
=
Globals
.
findObjectById
(
entity
[
'order'
])
inputDict
.
pop
(
'order'
)
entity
=
entityType
(
order
=
entityOrder
,
**
inputDict
)
entity
.
routeInBOM
=
True
else
:
entity
=
entityType
(
**
inputDict
)
...
...
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