美文网首页odoo
odoo跳转窗口时,取消导航条/面包屑

odoo跳转窗口时,取消导航条/面包屑

作者: 隔壁小红馆 | 来源:发表于2020-02-20 09:43 被阅读0次

odoo跳转窗口时,会记录上级菜单,也就导航和面包屑,但是有时间,连续性的跳转会导致面包屑太长或者重复,特别是向导差寻求的时候。
那么,跳转窗口是可以关闭面包屑的,且分前端和后端两种方式
后端:
target(可选)定义视图是在当前视图上打开(current)、使用全屏模式(fullscreen)、使用弹出框(new)、可使用main来代替current来清除面包屑导航

return {
                'type': 'ir.actions.act_window',
                'res_model': 'mrp.production',
                'views': [[self.env.ref('mrp.mrp_production_form_view').id, 'form']],
                'res_id': self.production_id.id,
                'target': 'main',
                'flags': {
                    'headless': False,
                },
            }

前端:

 this.do_action({
                    type: 'ir.actions.act_window',
                    res_model: event.data.act_model,
                    views: [[false, 'form']],
                    res_id: event.data.domain,
                }, {clear_breadcrumbs: true});

看完记得鼓励点赞,谢谢

相关文章

网友评论

    本文标题:odoo跳转窗口时,取消导航条/面包屑

    本文链接:https://www.haomeiwen.com/subject/ilvtqhtx.html