setup(){ this.action = useService("action"); }
openSettings(){ console.log("click action"); // this.action.doAction("base_setup.action_general_configuration"); this.action.doAction({ name: "帮助按钮点击事件", //自定义弹出框名称 type: 'ir.actions.act_window', //动作类型 res_model: 'items', //视图的model views: [ [false, 'form'], ], view_mode: "form", view_type: 'form', view_id: 'items_act_window', //视图的id flags: {'initial_mode': 'view',action_buttons:false}, //target: 'new'弹出框默认为编辑模式,需要只读模式的可以加上这句 target: 'new' //打开方式 }); console.log("click action over"); }
标签:false,form,视图,doAction,odoo,action,view From: https://www.cnblogs.com/pythonClub/p/17343104.html