[FIX] mrp,stock: correctly handle client action behaviors
Fixes 2 use cases: - barcode redirect after picking is validated (should return to menu instead of refreshing the validated picking). Issue was due to missing renaming of "on_close" to "onClose" after refactor occured - ensure the auto-print action during MO validation always has a context because the "Shop Floor/MES" expects any returned actions from validation to always have a context to add the extra context parameter of "skip_redirection" to it closes odoo/odoo#140352 Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
This commit is contained in:
@@ -1982,6 +1982,7 @@ class MrpProduction(models.Model):
|
||||
return {
|
||||
'type': 'ir.actions.client',
|
||||
'tag': 'do_multi_print',
|
||||
'context': {},
|
||||
'params': {
|
||||
'reports': report_actions,
|
||||
}
|
||||
|
||||
@@ -27,9 +27,9 @@ async function doMultiPrint(env, action) {
|
||||
}
|
||||
if (action.params.anotherAction) {
|
||||
return env.services.action.doAction(action.params.anotherAction);
|
||||
} else if (action.params.on_close) {
|
||||
} else if (action.params.onClose) {
|
||||
// handle special cases such as barcode
|
||||
action.params.on_close()
|
||||
action.params.onClose()
|
||||
} else {
|
||||
return env.services.action.doAction("reload_context");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user