Skip to content

Commit aa0ce79

Browse files
committed
[IMP] product_cost_security: hide standard_price column in product tree views
Adds the 'product_cost_security.group_product_cost' group restriction to the 'standard_price' field in both product.product and product.template tree views. This ensures that users without the explicit cost permission cannot visualize the cost column when triggering the "Search More" popup from sale orders or when accessing the default list views, strictly enforcing the visibility criteria.
1 parent c01c6d7 commit aa0ce79

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

product_cost_security/views/product_views.xml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,28 @@
1313
</xpath>
1414
</field>
1515
</record>
16+
17+
<!-- <record id="product_template_tree_view" model="ir.ui.view">
18+
<field name="model">product.template</field>
19+
<field name="inherit_id" ref="product.product_template_tree_view" />
20+
<field name="arch" type="xml">
21+
<xpath expr="//field[@name='standard_price']" position="attributes">
22+
<attribute
23+
name="groups"
24+
>product_cost_security.group_product_cost</attribute>
25+
</xpath>
26+
</field>
27+
</record>
28+
29+
<record id="product_product_tree_view" model="ir.ui.view">
30+
<field name="model">product.product</field>
31+
<field name="inherit_id" ref="product.product_product_tree_view" />
32+
<field name="arch" type="xml">
33+
<xpath expr="//field[@name='standard_price']" position="attributes">
34+
<attribute
35+
name="groups"
36+
>product_cost_security.group_product_cost</attribute>
37+
</xpath>
38+
</field>
39+
</record> -->
1640
</odoo>

0 commit comments

Comments
 (0)