[ADD] Use same decorator on product.product as on product.template tree view.

This commit is contained in:
Valentino
2019-02-21 13:53:21 -03:00
committed by ps-tubtim
parent 8c6a72e29d
commit 0f6e375a72
2 changed files with 15 additions and 1 deletions

View File

@@ -4,7 +4,7 @@
{
'name': 'Stock available to promise',
'version': '11.0.1.0.0',
'version': '11.0.1.1.0',
"author": "Numérigraphe, Sodexis, Odoo Community Association (OCA)",
'category': 'Warehouse',
'depends': ['stock'],

View File

@@ -32,4 +32,18 @@
</xpath>
</field>
</record>
<record model="ir.ui.view" id="view_stock_available_tree">
<field name="name">Quantity available to promise (variant tree)</field>
<field name="model">product.product</field>
<field name="inherit_id" ref="stock.view_stock_product_tree"/>
<field name="arch" type="xml">
<tree position="attributes">
<attribute name="decoration-danger">virtual_available&lt;0 or immediately_usable_qty&lt;0</attribute>
<attribute name="decoration-info">virtual_available&gt;=0 or immediately_usable_qty&gt;0</attribute>
</tree>
<field name="virtual_available" position="after">
<field name="immediately_usable_qty" />
</field>
</field>
</record>
</odoo>