跳至內容
選單
此問題已被標幟
2 回覆
3011 瀏覽次數

In Odoo xml "invisible" attributes/class used to hide menu or button or records from particular users. But user can see confidential records by removing o_inivisible_modifier class through inspect element or from browser developer tools.

頭像
捨棄
最佳答案

You can try this code :


odoo.define('module_name.invisible', function (require) {
    "use strict";
    var FormRenderer = require('web.FormRenderer');
    FormRenderer.include({
        start: function () {
            return this._super.apply(this, arguments).then(() =>{
                this.$el.find('.o_invisible_modifier').remove()
// if the remove() function didn't work you can use hide()
            })
    },
    })
    })


Hope it helps

頭像
捨棄
最佳答案

Hi,

Does anyone have a solution for this?

Am experiencing the same issue in Odoo 13

Thanks in Advance

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
8月 23
4720
1
3月 18
6748
2
7月 24
13885
2
12月 23
12506
3
7月 22
22807