Compare commits
No commits in common. "19.0" and "main" have entirely different histories.
15
.gitignore
vendored
15
.gitignore
vendored
@ -1,15 +0,0 @@
|
||||
# Python
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
|
||||
# OS
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
# Editor
|
||||
.vscode/
|
||||
.idea/
|
||||
|
||||
# Odoo
|
||||
*.pot
|
||||
0
README.rst
Executable file → Normal file
0
README.rst
Executable file → Normal file
0
__init__.py
Executable file → Normal file
0
__init__.py
Executable file → Normal file
2
__manifest__.py
Executable file → Normal file
2
__manifest__.py
Executable file → Normal file
@ -1,6 +1,6 @@
|
||||
{
|
||||
'name': 'Hide Update Quantity Button',
|
||||
'version': '19.0.1.0.0',
|
||||
'version': '18.0.1.0.0',
|
||||
'category': 'Inventory',
|
||||
'summary': 'Hide Update Quantity button for non-ERP managers',
|
||||
'description': """
|
||||
|
||||
28
views/product_views.xml
Executable file → Normal file
28
views/product_views.xml
Executable file → Normal file
@ -4,9 +4,33 @@
|
||||
<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.view_template_property_form"/>
|
||||
<field name="inherit_id" ref="stock.product_template_form_view_procurement_button"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//a[@name='action_open_quants']" position="attributes">
|
||||
<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>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user