hide_update_quantity_button/views/product_views.xml
2025-11-24 15:14:58 +07:00

38 lines
2.0 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Inherit the product template form view to modify the Update Quantity button visibility -->
<record id="product_template_form_view_procurement_button_inherit" model="ir.ui.view">
<field name="name">product.template.form.view.procurement.button.inherit</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="stock.product_template_form_view_procurement_button"/>
<field name="arch" type="xml">
<xpath expr="//button[@name='action_update_quantity_on_hand']" position="attributes">
<attribute name="groups">base.group_erp_manager</attribute>
</xpath>
</field>
</record>
<!-- Inherit the product form view to modify the Update Quantity button visibility -->
<record id="product_form_view_procurement_button_inherit" model="ir.ui.view">
<field name="name">product.form.view.procurement.button.inherit</field>
<field name="model">product.product</field>
<field name="inherit_id" ref="stock.product_form_view_procurement_button"/>
<field name="arch" type="xml">
<xpath expr="//button[@name='action_update_quantity_on_hand']" position="attributes">
<attribute name="groups">base.group_erp_manager</attribute>
</xpath>
</field>
</record>
<!-- Inherit the easy edit product view to modify the Update Quantity button visibility -->
<record id="product_product_view_form_easy_inherit_stock_inherit" model="ir.ui.view">
<field name="name">product.product.view.form.easy.inherit.stock.inherit</field>
<field name="model">product.product</field>
<field name="inherit_id" ref="stock.product_product_view_form_easy_inherit_stock"/>
<field name="arch" type="xml">
<xpath expr="//button[@name='action_update_quantity_on_hand']" position="attributes">
<attribute name="groups">base.group_erp_manager</attribute>
</xpath>
</field>
</record>
</odoo>