70 lines
2.8 KiB
XML
70 lines
2.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!--
|
|
Copyright 2021-2022 Akretion (http://www.akretion.com/)
|
|
@author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
-->
|
|
|
|
<odoo>
|
|
|
|
|
|
<record id="view_stock_product_template_tree" model="ir.ui.view">
|
|
<field name="name">stock.usability.product.template.tree</field>
|
|
<field name="model">product.template</field>
|
|
<field name="inherit_id" ref="stock.view_stock_product_template_tree" />
|
|
<field name="arch" type="xml">
|
|
<field name="virtual_available" position="before">
|
|
<field name="incoming_qty" optional="hide" sum="1"/>
|
|
<field name="outgoing_qty" optional="hide" sum="1"/>
|
|
<!-- we would like to also have free_qty, as on product.product, but this field doesn't exist on product.template -->
|
|
</field>
|
|
<!-- we have sum=1 on product.product qty fields, but not on product.template...so I add it on product.template -->
|
|
<field name="virtual_available" position="attributes">
|
|
<attribute name="sum">1</attribute>
|
|
</field>
|
|
<field name="qty_available" position="attributes">
|
|
<attribute name="sum">1</attribute>
|
|
</field>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="product_template_form_view_procurement_button" model="ir.ui.view">
|
|
<field name="name">stock_usability.product.template.form</field>
|
|
<field name="model">product.template</field>
|
|
<field name="inherit_id" ref="stock.product_template_form_view_procurement_button"/>
|
|
<field name="arch" type="xml">
|
|
<button name="action_view_stock_move_lines" position="before">
|
|
<button
|
|
type="object"
|
|
name= "action_view_stock_move"
|
|
invisible="type != 'consu'"
|
|
groups="stock.group_stock_user"
|
|
class="oe_stat_button" icon="fa-exchange"
|
|
>
|
|
<div class="o_stat_info">
|
|
<span class="o_stat_text">Stock Moves</span>
|
|
</div>
|
|
</button>
|
|
</button>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="product_form_view_procurement_button" model="ir.ui.view">
|
|
<field name="name">stock_usability.product.product.form</field>
|
|
<field name="model">product.product</field>
|
|
<field name="inherit_id" ref="stock.product_form_view_procurement_button"/>
|
|
<field name="arch" type="xml">
|
|
<button name="action_view_stock_move_lines" position="before">
|
|
<button string="Stock Moves"
|
|
type="object"
|
|
name= "action_view_stock_move"
|
|
invisible="type != 'consu'"
|
|
groups="stock.group_stock_user"
|
|
class="oe_stat_button" icon="fa-exchange"
|
|
/>
|
|
</button>
|
|
</field>
|
|
</record>
|
|
|
|
</odoo>
|