This question has been flagged
3773 Views

I'm trying to refresh the view after a wizard is closed, in odoo 9,  without reload all the page, like this

return {
'type': 'ir.actions.client',
'tag': 'reload',
}

So following the post https://www.odoo.com/es_ES/forum/ayuda-1/question/how-to-refresh-the-original-view-after-wizard-actions-10268 I append to the python function:

return {'type': 'ir.actions.act_close_wizard_and_refresh_view'} #TODO check this so not reload all the view

And a javascript file with the extend of the action_manager


odoo.define('sale_order_variant_mgmt.action_manager', function(require) {
var action_manager = require('web.ActionManager');
var MyModuleActionManager = action_manager.include({
ir_actions_act_close_wizard_and_reload_view: function (action, options) {
if (!this.dialog) {
options.on_close();
}
this.dialog_stop();
this.inner_widget.active_view.controller.do_reload();
return $.when();
},
});
return MyModuleActionManager;
});


But I'm getting the following error 
Action manager can't handle action of type ir.actions.act_close_wizard_and_refresh_view

Objectcontext: active_id: 15active_ids: [15]active_model: "sale.manage.variant"lang: "es_AR"params: {action: 318, id: 16, view_type: "form", model: "sale.order", _push_me: false}search_disable_custom_filters: truetz: "Europe/Brussels"uid: 1__proto__: Objectflags: {}menu_id: nulltype: "ir.actions.act_close_wizard_and_refresh_view"__proto__: Object

do_action @ web.assets_backend.js:3126

Any idea what I'm doing wrong?
thanks
Avatar
Discard