Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
1966 Lượt xem

i have some user in advisor group accounting

but i want to prevent them to show salaries journal , its entries , items and from finantial report

ex

this user added in tab in journal notebook

if he go to balance sheet

he can show total salaries but can't click on arrow and show details



i tried javascript but i can't do it



odoo.define('module.nt_hr_payroll_community', function (require) {
"use strict";

var menu = document.getElementsByClassName('o_dropdown_menu dropdown-menu o_filter_menu show')
document.getElementsByClassName('o_dropdown_menu dropdown-menu o_filter_menu show')[0].addEventListener("onClick", hideJournal);

function hideJournal(){
if (menu){
// var ajax = require('web.ajax');
var
nodes = menu[0].childNodes
var v = ''
for
(i of nodes){
if(i.tagName == 'A'){
if (i.textContent){
journal = i.textContent.replace(/\s/g, '')
if(journal == 'Bank'){
}
}
}
}
}

}

});




i tried this code but  dosn't work 


Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

With Journal Groups!

Book what you want to hide in specific journals and use Journal Groups which is exactly for that:



Ảnh đại diện
Huỷ bỏ
Tác giả

thank you for answer but this not i want
i changed quistion and description

Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 5 23
3110
1
thg 4 23
3385
1
thg 1 23
7915
0
thg 7 21
1976
1
thg 12 20
7449