Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
6486 มุมมอง

Hello,

I am trying to hide certain apps from the settings menu. I found one way which is: 
<delete id="project.res_config_settings_view_form" model="ir.ui.view"/>

This particular line with delete the entire menu of project from the settings. However, i'd prefer to hide over delete. Also, im not trying to xpath into a menu and hide certain settings. Im trying to hide the entire module settings like it was never there.


อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi Andrew,

You just need to set the active=False in the menu which will hide the menu without deleting it.

<record id="project.res_config_settings_view_form" model="ir.ui.view">
<field name="active">False</field>
</record?>


อวตาร
ละทิ้ง
ผู้เขียน

You sir, are a genius! Thank you! I could not find anything about this in the documentation. Thanks!

You are welcome! Please accept the answer if you think you issue is solved so that it will help other people for reference.

You are a genius Sudhir. However, i have another question. What if you want to make this app invisible in general settings for some users that belong to a particular group?

Princess: You can add the groups in the menu:

<xpath expr="//div[@id='my_app']" position="attributes">
<attribute name="groups">!my_security_group</groups>
</xpath>

With this code, the user of "my_security_group" group will not be able to see the menu.

Related Posts ตอบกลับ มุมมอง กิจกรรม
0
มี.ค. 19
3877
Combine menu items of multiple modules แก้ไขแล้ว
2
มี.ค. 19
6892
Add Custom filed in pos settings แก้ไขแล้ว
2
มี.ค. 23
3968
2
เม.ย. 19
4274
0
มี.ค. 19
6714