Skip to content

Commit 5a66a5a

Browse files
author
Valentino
committed
[ADD] Use same decorator on product.product as on product.template tree view.
1 parent bfeab5e commit 5a66a5a

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

stock_available/__manifest__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

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

stock_available/views/product_product_view.xml

+14
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,18 @@
3232
</xpath>
3333
</field>
3434
</record>
35+
<record model="ir.ui.view" id="view_stock_available_tree">
36+
<field name="name">Quantity available to promise (variant tree)</field>
37+
<field name="model">product.product</field>
38+
<field name="inherit_id" ref="stock.view_stock_product_tree"/>
39+
<field name="arch" type="xml">
40+
<tree position="attributes">
41+
<attribute name="decoration-danger">virtual_available&lt;0 or immediately_usable_qty&lt;0</attribute>
42+
<attribute name="decoration-info">virtual_available&gt;=0 or immediately_usable_qty&gt;0</attribute>
43+
</tree>
44+
<field name="virtual_available" position="after">
45+
<field name="immediately_usable_qty" />
46+
</field>
47+
</field>
48+
</record>
3549
</odoo>

0 commit comments

Comments
 (0)