Commit f12ee56a authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_mrp_quality_assurance: show also quality history of caisse

parent 6d593128
from Products.ZSQLCatalog.SQLCatalog import SimpleQuery, ComplexQuery from Products.ZSQLCatalog.SQLCatalog import SimpleQuery, ComplexQuery
causality_uid_list = [context.getUid()]
if context.getPortalType() == 'Manufacturing Execution':
ipl = context.getOrderRelatedValue(portal_type='Internal Packing List')
if ipl:
causality_uid_list.append(ipl.getUid())
pasted_quality_history = context.portal_catalog( pasted_quality_history = context.portal_catalog(
validation_state='posted', validation_state='posted',
strict_publication_section_uid = context.portal_categories.publication_section.quality_insurance.getUid(), strict_publication_section_uid = context.portal_categories.publication_section.quality_insurance.getUid(),
...@@ -10,7 +16,7 @@ pasted_quality_history = context.portal_catalog( ...@@ -10,7 +16,7 @@ pasted_quality_history = context.portal_catalog(
logical_operator='AND'), logical_operator='AND'),
SimpleQuery(portal_type=('Gate', 'Traceability', 'Defect Declaration', 'Defect Correction', 'SMON', 'ACOM')), SimpleQuery(portal_type=('Gate', 'Traceability', 'Defect Declaration', 'Defect Correction', 'SMON', 'ACOM')),
logical_operator='OR'), logical_operator='OR'),
strict_causality_uid = context.getUid(), strict_causality_uid = causality_uid_list,
**kw **kw
) )
return pasted_quality_history return pasted_quality_history
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment