Skip to content

Commit

Permalink
[IMP] fermente_stock: simplify product views, hidden fields by default
Browse files Browse the repository at this point in the history
  • Loading branch information
legalsylvain committed Dec 9, 2024
1 parent 7ee6693 commit c29f772
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fermente_stock/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@
"website": "https://github.com/grap/grap-odoo-custom",
"license": "AGPL-3",
"depends": ["stock"],
"data": [
"views/view_product_product.xml",
"views/view_product_template.xml",
],
}
21 changes: 21 additions & 0 deletions fermente_stock/views/view_product_product.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2024 - Today: GRAP (http://www.grap.coop)
@author: Sylvain LE GAL
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->
<odoo>

<record id="view_product_product_tree" model="ir.ui.view">
<field name="model">product.product</field>
<field name="inherit_id" ref="stock.view_stock_product_tree"/>
<field name="arch" type="xml">

<!-- HIDE fields by default -->
<field name="virtual_available" position="attributes">
<attribute name="optional">hide</attribute>
</field>
</field>
</record>

</odoo>
24 changes: 24 additions & 0 deletions fermente_stock/views/view_product_template.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2024 - Today: GRAP (http://www.grap.coop)
@author: Sylvain LE GAL
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->
<odoo>

<record id="view_product_template_tree" model="ir.ui.view">
<field name="model">product.template</field>
<field name="inherit_id" ref="stock.view_stock_product_template_tree"/>
<field name="arch" type="xml">

<!-- HIDE fields by default -->
<field name="responsible_id" position="attributes">
<attribute name="optional">hide</attribute>
</field>
<field name="virtual_available" position="attributes">
<attribute name="optional">hide</attribute>
</field>
</field>
</record>

</odoo>

0 comments on commit c29f772

Please sign in to comment.