Skip to Content
Menu
This question has been flagged

Anyone knows if there is a way of loading a form in the current window, instead of a new one, when using javascript inside a widget?


self.action_manager.do_action({

     type: 'ir.actions.act_window',                       

    res_model: 'hotel.reservation',                       

    views: [[false, 'form']],                       

    view_type: 'form',                       

    view_mode: 'form',                       

    target: 'current',                       

    res_id: reservation_id               

});

 

The previous code will cause an error:

this.main_control_panel is undefined


I've already tried "current", "inline", "self"...

Avatar
Discard
Related Posts Replies Views Activity
0
Aug 20
1941
0
Feb 18
2564
0
Sep 17
3205
2
Nov 15
194
1
Feb 24
11103