You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
734 B
20 lines
734 B
odoo.define('restrict_web_debug.debug_menu', function (require) {
|
|
"use strict";
|
|
const { onMounted } = owl.hooks;
|
|
const { DebugMenuBasic } = require("@web/core/debug/debug_menu_basic");
|
|
const { patch } = require('web.utils');
|
|
const { useRef } = owl.hooks;
|
|
const session = require('web.session');
|
|
/** Patch DebugMenuBasic to disable option of debug **/
|
|
patch(DebugMenuBasic.prototype, "restrict_web_debug", {
|
|
setup() {
|
|
this._super(...arguments);
|
|
this.root = useRef("DebugDropDown");
|
|
onMounted(() => {
|
|
if (session.user_group == false) {
|
|
$(this.root.el).addClass("d-none")
|
|
}
|
|
});
|
|
}
|
|
})
|
|
});
|
|
|