Commit 8a968f60 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

erp5_mrp_quality_assurance: checking defects are opened also check the state of objects

parent f12ee56a
......@@ -8,10 +8,10 @@ if incompleted_list:
"portal_status_level": "error"
})
defect_item = context.Base_getManufacturingExecutionRelatedDefectList(portal_type='Defect Item', validation_state='opened')
if defect_item:
opened_defect_list = context.Base_getManufacturingExecutionRelatedDefectList(portal_type='Defect Item', validation_state='opened')
# We get the object in case immediateReindexObject was not immediate
for defect in opened_defect_list:
if defect.getObject().getValidationState() == "opened":
return context.Base_redirect('view', keep_items={
"portal_status_message":context.Base_translateString("Defects are not closed"),
"portal_status_level": "error"
......
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