How can I hide certain columns in tree view for certain users
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Księgowość
- Zapasy
- PoS
- Project
- MRP
To pytanie dostało ostrzeżenie
You can create a "group". And then add users to that group, who wants to see it. The non-members cannot see that column.
To create a group,
Eg:
<record id="group_uom" model="res.groups">
<field name="name">Manage Multiple Units of Measure</field>
<field name="category_id" ref="base.module_category_hidden"/>
</record>
In the tree view, specify that group in the column you want:
Eg:
<record id="stock_inventory_line_tree" model="ir.ui.view">
<field name="name">stock.inventory.line.tree</field>
<field name="model">stock.inventory.line</field>
<field name="arch" type="xml">
<tree string="Stock Inventory Lines">
<field name="product_id"/>
<field name="product_qty"/>
<field name="product_uom_id" groups="product.group_uom"/>
<field name="location_id" groups="stock.group_locations"/>
</tree>
</field>
</record>
Please refer stock_view.xml in the stock module for referrence to find the above code. And group_uom you can find in product module under security>>product_security.xml. Try to understand how to create the group and use it, thats it :)
Thanks @Akhil.
Podoba Ci się ta dyskusja? Dołącz do niej!
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj sięPowiązane posty | Odpowiedzi | Widoki | Czynność | |
---|---|---|---|---|
|
1
lis 23
|
3057 | ||
|
0
lip 24
|
917 | ||
|
2
kwi 21
|
3809 | ||
how to hide field in tree view odoo 12
Rozwiązane
|
|
3
wrz 19
|
11688 | |
|
0
mar 17
|
2669 |