diff --git a/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js b/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js index 227cd671..a263f6d0 100644 --- a/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js +++ b/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js @@ -78,7 +78,57 @@ openerp.web_ir_actions_act_window_message = function(instance) { if(_.isObject(result)) { - self.do_action(result); + // clean the action as it is done in the method ``fix_view_modes`` + // in the main controller of the web module + action = result; + if ( ! ('views' in action) ){ + view_id = action.view_id || false; + if ( view_id instanceof Array ){ + view_id = view_id[0]; + } + view_modes = action.view_mode.split(","); + if ( view_modes.length > 1 ){ + if (view_id){ + throw new Error( + _.str.sprintf(_t("Non-db action dictionaries should provide " + + "either multiple view modes or a single view " + + "mode and an optional view id."))); + } + action.views = []; + for ( i=0; i