Initialize v18 branch
Rename *_usability modules to *_usability_akretion
This commit is contained in:
68
stock_usability_akretion/views/product.xml
Normal file
68
stock_usability_akretion/views/product.xml
Normal file
@@ -0,0 +1,68 @@
|
||||
<?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="responsible_id" position="attributes">
|
||||
<attribute name="optional">hide</attribute>
|
||||
</field>
|
||||
<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 string="Stock Moves"
|
||||
type="object"
|
||||
name= "action_view_stock_move"
|
||||
attrs="{'invisible': [('type', 'not in', ('product', 'consu'))]}"
|
||||
groups="stock.group_stock_user"
|
||||
class="oe_stat_button" icon="fa-exchange"
|
||||
/>
|
||||
</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"
|
||||
attrs="{'invisible': [('type', 'not in', ('product', 'consu'))]}"
|
||||
groups="stock.group_stock_user"
|
||||
class="oe_stat_button" icon="fa-exchange"
|
||||
/>
|
||||
</button>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user