I'm trying to develop a small module to hide Graph view in purchase module and I tried the below way but not working with me. Any help on this will be appreciated.
What I did is below:
- created a group as below:
<record id="view_price" model="res.groups"><field name="name">View All Prices</field><field name="users" eval="[(4, ref('base.user_root'))]"/></record>
Then I tried to inherit the graph view and restrict access to the above group:
<record model="ir.ui.view" id="hide_purchase_order_graph"><field name="model">purchase.order</field><field name="inherit_id" ref="purchase.purchase_order_graph"/><field name="arch" type="xml"><xpath expr="//field[@name='amount_total']" position="attributes"><attribute name="groups">hide_prices.view_price</attribute></xpath></field></record>