Files
stock-logistics-warehouse/stock_available_unreserved/views/product_view.xml
Jordi Ballester Alomar d933978d17 [ADD] new module 'stock_available_unreserved' (#206)
* [ADD] new module 'stock_available_unreserved'
2017-02-27 11:29:19 +01:00

79 lines
3.4 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_stock_product_template_tree" model="ir.ui.view">
<field name="name">product.template.stock.tree.inherit</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="qty_available" position="after">
<field name="qty_available_not_res"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="product_template_kanban_stock_view">
<field name="name">Product Template Kanban Stock</field>
<field name="model">product.template</field>
<field name="inherit_id"
ref="stock.product_template_kanban_stock_view"/>
<field name="arch" type="xml">
<ul position="inside">
<li t-if="record.type.raw_value == 'product'">Unreserved: <field name="qty_available_not_res"/> <field name="uom_id"/></li>
</ul>
</field>
</record>
<record id="view_stock_product_tree" model="ir.ui.view">
<field name="name">product.stock.tree.inherit</field>
<field name="model">product.product</field>
<field name="inherit_id" ref="stock.view_stock_product_tree"/>
<field name="arch" type="xml">
<field name="qty_available" position="after">
<field name="qty_available_not_res"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="product_template_form_view_procurement_button">
<field name="name">product.template_procurement</field>
<field name="model">product.template</field>
<field name="inherit_id"
ref="stock.product_template_form_view_procurement_button"/>
<field name="arch" type="xml">
<div name="button_box" position="inside">
<button type="object"
name="action_open_quants_unreserved"
attrs="{'invisible':[('type', '!=', 'product')]}"
class="oe_stat_button" icon="fa-building-o">
<field name="qty_available_not_res" widget="statinfo"
string="Unreserved"/>
</button>
</div>
</field>
</record>
<record model="ir.ui.view" id="product_form_view_procurement_button">
<field name="name">product.product.procurement</field>
<field name="model">product.product</field>
<field name="inherit_id"
ref="stock.product_form_view_procurement_button"/>
<field name="arch" type="xml">
<div name="button_box" position="inside">
<button class="oe_stat_button"
name="%(product_open_quants_unreserved)d"
icon="fa-building-o"
type="action" attrs="{'invisible':[('type', '!=', 'product')]}">
<field name="qty_available_not_res" widget="statinfo"
string="Unreserved"/>
</button>
</div>
</field>
</record>
</data>
</openerp>