Hi there,
I'm developing a module that hides the cost price `purchase_price` in sale order for users without `group_show_cost_and_margin`. I've created a view that modifies `sale.order.line.tree.margin.view.form` from sale_margin (https://github.com/odoo/odoo/blob/10.0/addons/sale_margin/views/sale_margin_view.xml).
My view:
<record id="sale_order_line_purchase_price_form" model="ir.ui.view">
<field name="name">ale.order.line.tree.purchase.form</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale_margin.sale_margin_sale_order_line"/>
<field name="arch" type="xml">
<field name="purchase_price" position="replace">
<field name="purchase_price" groups="hide_cost_margin.group_show_cost_and_margin"/>
</field>
</field>
</record>However, the cost column is still shown for users without `group_show_cost_and_margin` permission.
What am I doing wrong?
Thanks you in advance.