콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
6026 화면

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

아바타
취소
베스트 답변

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.

관련 게시물 답글 화면 활동
1
11월 23
3240
0
7월 24
1037
2
4월 21
3930
3
9월 19
11829
0
3월 17
2803