Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

1

Hide Columns in treeview for certain users

By
Herman
on 8/26/15, 11:52 AM 479 views

How can I hide certain columns in tree view for certain users

3

Akhil P Sivan

--Akhil P Sivan--
3423
| 5 3 6
Kochi, India
--Akhil P Sivan--

Interested in exploring Odoo both technically & functionality wise.

email-id : akhilpsivan01@gmail.com

Akhil P Sivan
On 8/26/15, 12:11 PM

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.

Ankit H Gandhi(AHG)
on 8/27/15, 3:20 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 8/26/15, 11:52 AM
Seen: 479 times
Last updated: 8/27/15, 3:19 AM