You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

59 lines
2.5 KiB

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Hide product cost and sale price in product form view-->
<record id="product_normal_form_view" model="ir.ui.view">
<field name="name">
product.product.view.form.inherit.hide.cost.price
</field>
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_normal_form_view"/>
<field name="arch" type="xml">
<field name="lst_price" position="attributes">
<attribute name="groups">
hide_cost_price.hide_cost_price_group_view_product_sale_price
</attribute>
</field>
<field name="standard_price" position="attributes">
<attribute name="groups">
hide_cost_price.hide_cost_price_group_view_product_cost
</attribute>
</field>
</field>
</record>
<!-- Hide product cost and sale price in product kanban view-->
<record id="product_kanban_view" model="ir.ui.view">
<field name="name">
product.product.view.kanban.inherit.hide.cost.price
</field>
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_kanban_view"/>
<field name="arch" type="xml">
<xpath expr="//div[hasclass('oe_kanban_details')]/ul"
position="attributes">
<attribute name="groups">
hide_cost_price.hide_cost_price_group_view_product_sale_price
</attribute>
</xpath>
</field>
</record>
<!-- Hide product cost and price in product tree view-->
<record id="product_product_tree_view" model="ir.ui.view">
<field name="name">
product.product.view.tree.inherit.hide.cost.price
</field>
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_product_tree_view"/>
<field name="arch" type="xml">
<field name="lst_price" position="attributes">
<attribute name="groups">
hide_cost_price.hide_cost_price_group_view_product_sale_price
</attribute>
</field>
<field name="standard_price" position="attributes">
<attribute name="groups">
hide_cost_price.hide_cost_price_group_view_product_cost
</attribute>
</field>
</field>
</record>
</odoo>