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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Xiaowu Zhang
erp5
Commits
d12d19d5
Commit
d12d19d5
authored
Jan 20, 2025
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_mrp_quality_assurance_test: test
parent
361715ac
Pipeline
#39155
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
+14
-7
bt5/erp5_mrp_quality_assurance_test/TestTemplateItem/portal_components/test.erp5.testManufacturingQualityControl.py
...l_components/test.erp5.testManufacturingQualityControl.py
+14
-7
No files found.
bt5/erp5_mrp_quality_assurance_test/TestTemplateItem/portal_components/test.erp5.testManufacturingQualityControl.py
View file @
d12d19d5
...
...
@@ -40,16 +40,19 @@ class TestQualityAssurance(ERP5TypeTestCase):
ppl_id_list
=
[]
mo_id_list
=
[]
for
po
in
po_list
:
ppl
=
po
.
getCausalityRelatedValue
(
portal_type
=
'Production Packing List'
)
if
ppl
:
for
ppl
in
po
.
getCausalityRelatedValueList
(
portal_type
=
'Production Packing List'
):
ppl_id_list
.
append
(
ppl
.
getId
())
sm
=
po
.
get
Deliver
yRelatedValue
(
portal_type
=
'Simulation Movement'
)
sm
=
po
.
get
Causalit
yRelatedValue
(
portal_type
=
'Simulation Movement'
)
if
sm
:
sm_id_list
.
append
(
sm
.
getId
())
for
me
in
po
.
getCausalityRelatedValueList
(
portal_type
=
'Manufacturing Execution'
):
me_id_list
.
append
(
me
.
getId
())
for
mo
in
po
.
getCausalityRelatedValueList
(
portal_type
=
'Manufacturing Order'
):
mo_id_list
.
append
(
mo
.
getId
())
for
quality_element
in
me
.
getCausalityRelatedValueList
(
portal_type
=
(
'Quality Control'
,
'Traceability'
,
'Gate'
,
'Defect Declaration'
,
'Defect Correction'
,
'SMON'
,
'ACOM'
)):
if
quality_element
.
getId
()
not
in
quality_element_id_list
:
quality_element_id_list
.
append
(
quality_element
.
getId
())
for
mo_line
in
po
.
getCausalityRelatedValueList
(
portal_type
=
'Manufacturing Order Line'
):
mo_id_list
.
append
(
mo_line
.
getParentValue
().
getId
())
self
.
portal
.
quality_assurance_module
.
manage_delObjects
(
ids
=
quality_element_id_list
)
...
...
@@ -57,6 +60,7 @@ class TestQualityAssurance(ERP5TypeTestCase):
self
.
portal
.
production_packing_list_module
.
manage_delObjects
(
ids
=
ppl_id_list
)
self
.
portal
.
manufacturing_order_module
.
manage_delObjects
(
ids
=
mo_id_list
)
self
.
portal
.
manufacturing_execution_module
.
manage_delObjects
(
ids
=
me_id_list
)
self
.
quality_element_type
=
getattr
(
self
.
portal
.
portal_types
,
'Quality Assurance Module'
).
getTypeAllowedContentTypeList
()
self
.
tic
()
...
...
@@ -69,7 +73,7 @@ class TestQualityAssurance(ERP5TypeTestCase):
publication_section
=
'quality_insurance'
)
for
portal_type
in
[
'Quality Control'
,
'Traceability'
,
'Gate'
,
'Defect Declaration'
,
'Defect Correction'
,
'SMON'
,
'ACOM'
]
:
for
portal_type
in
self
.
quality_element_type
:
quality_element
=
createTestElement
(
portal_type
)
self
.
assertEquals
(
quality_element
.
getValidationState
(),
'draft'
)
quality_element
.
plan
()
...
...
@@ -111,7 +115,7 @@ class TestQualityAssurance(ERP5TypeTestCase):
id
=
'test_%s'
%
DateTime
().
second
(),
ledger
=
'manufacturing/execution'
)
for
portal_type
in
[
'Quality Control'
,
'Traceability'
,
'Gate'
,
'Quality Control'
,
'SMON'
,
'Quality Control'
,
'ACOM'
]
:
for
portal_type
in
self
.
quality_element_type
:
quality_element
=
createTestElement
(
portal_type
=
portal_type
)
quality_element
.
edit
(
int_index
=
index
,
causality_value
=
me_2
)
quality_element
.
plan
()
...
...
@@ -165,6 +169,9 @@ class TestQualityAssurance(ERP5TypeTestCase):
self
.
tic
()
self
.
portal
.
portal_alarms
.
quality_assurance_builder_alarm
.
activeSense
()
self
.
tic
()
me
=
[
x
for
x
in
po
.
getCausalityRelatedValueList
(
portal_type
=
'Manufacturing Execution'
)
if
x
.
getLedger
()
==
'manufacturing/execution'
][
0
]
quality_element_list
=
me
.
getCausalityRelatedValueList
(
portal_type
=
self
.
quality_element_type
)
self
.
assertEquals
(
len
(
quality_element_list
),
15
,
quality_element_list
)
...
...
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