Commit a39643ab authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_mrp_quality_assurance: redirect to production packing list if ME is already delivered

parent 455fc345
Pipeline #38461 failed with stage
in 0 seconds
......@@ -49,7 +49,16 @@ context.post()
if batch:
return context
ME = context.getCausalityValue(portal_type='Manufacturing Execution')
return ME.Base_redirect(
if ME.getSimulationState() != 'delivered':
return ME.Base_redirect(
'view',
keep_items={
"portal_status_message":context.Base_translateString("Result is posted for ${title}", mapping={"title": context.getTitle()})
})
po = ME.getCausalityValue(portal_type='Production Order')
ppl = po.getCausalityRelatedValue(portal_type='Production Packing List')
return ppl.Base_redirect(
'view',
keep_items={
"portal_status_message":context.Base_translateString("Result is posted for ${title}", mapping={"title": context.getTitle()})
......
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