|
4 | 4 | License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -->
|
5 | 5 |
|
6 | 6 | <odoo>
|
7 |
| - <record model="ir.ui.view" id="view_stock_available_form"> |
8 |
| - <field name="name">Quantity available to promise (form)</field> |
9 |
| - <field name="model">product.template</field> |
10 |
| - <field name="inherit_id" ref="stock.product_template_form_view_procurement_button" /> |
11 |
| - <field name="arch" type="xml"> |
12 |
| - <xpath expr="//button[@name='%(stock.action_stock_level_forecast_report_template)d']" |
13 |
| - position="after"> |
14 |
| - <button type="object" name="action_open_quants" |
15 |
| - attrs="{'invisible':[('type', 'not in', ['product','consu'])]}" |
16 |
| - class="oe_stat_button" icon="fa-building-o"> |
17 |
| - <div class="o_form_field o_stat_info"> |
18 |
| - <field name="immediately_usable_qty" |
19 |
| - widget="statinfo" nolabel="1" /> |
20 |
| - <span class="o_stat_text">Available</span> |
21 |
| - </div> |
22 |
| - </button> |
23 |
| - <button type="action" name="%(stock.product_open_quants)d" |
24 |
| - attrs="{'invisible':[('type', 'not in', ['product','consu'])]}" |
25 |
| - class="oe_stat_button" icon="fa-building-o"> |
26 |
| - <div class="o_form_field o_stat_info"> |
27 |
| - <field name="potential_qty" |
28 |
| - widget="statinfo" nolabel="1"/> |
29 |
| - <span class="o_stat_text">Potential</span> |
30 |
| - </div> |
31 |
| - </button> |
32 |
| - </xpath> |
| 7 | + <record model="ir.ui.view" id="view_stock_available_form"> |
| 8 | + <field name="name">Quantity available to promise (form)</field> |
| 9 | + <field name="model">product.template</field> |
| 10 | + <field name="inherit_id" ref="stock.product_template_form_view_procurement_button" /> |
| 11 | + <field name="arch" type="xml"> |
| 12 | + <xpath expr="//button[@name='%(stock.action_stock_level_forecast_report_template)d']" |
| 13 | + position="after"> |
| 14 | + <button type="object" name="action_open_quants" |
| 15 | + attrs="{'invisible':[('type', 'not in', ['product','consu'])]}" |
| 16 | + class="oe_stat_button" icon="fa-building-o"> |
| 17 | + <div class="o_form_field o_stat_info"> |
| 18 | + <field name="immediately_usable_qty" |
| 19 | + widget="statinfo" nolabel="1" /> |
| 20 | + <span class="o_stat_text">Available</span> |
| 21 | + </div> |
| 22 | + </button> |
| 23 | + <button type="action" name="%(stock.product_open_quants)d" |
| 24 | + attrs="{'invisible':[('type', 'not in', ['product','consu'])]}" |
| 25 | + class="oe_stat_button" icon="fa-building-o"> |
| 26 | + <div class="o_form_field o_stat_info"> |
| 27 | + <field name="potential_qty" |
| 28 | + widget="statinfo" nolabel="1"/> |
| 29 | + <span class="o_stat_text">Potential</span> |
| 30 | + </div> |
| 31 | + </button> |
| 32 | + </xpath> |
| 33 | + </field> |
| 34 | + </record> |
| 35 | + <record model="ir.ui.view" id="view_stock_available_tree"> |
| 36 | + <field name="name">Quantity available to promise (tree)</field> |
| 37 | + <field name="model">product.template</field> |
| 38 | + <field name="inherit_id" ref="stock.view_stock_product_template_tree"/> |
| 39 | + <field name="arch" type="xml"> |
| 40 | + <tree position="attributes"> |
| 41 | + <attribute name="decoration-danger">virtual_available<0 or immediately_usable_qty<0</attribute> |
| 42 | + <attribute name="decoration-info">virtual_available>=0 or immediately_usable_qty>0</attribute> |
| 43 | + </tree> |
| 44 | + <field name="virtual_available" position="after"> |
| 45 | + <field name="immediately_usable_qty" /> |
33 | 46 | </field>
|
34 |
| - </record> |
35 |
| - <record model="ir.ui.view" id="view_stock_available_tree"> |
36 |
| - <field name="name">Quantity available to promise (tree)</field> |
37 |
| - <field name="model">product.template</field> |
38 |
| - <field name="inherit_id" ref="stock.view_stock_product_template_tree"/> |
39 |
| - <field name="arch" type="xml"> |
40 |
| - <tree position="attributes"> |
41 |
| - <attribute name="decoration-danger">virtual_available<0 or immediately_usable_qty<0</attribute> |
42 |
| - <attribute name="decoration-info">virtual_available>=0 or immediately_usable_qty>0</attribute> |
43 |
| - </tree> |
44 |
| - <field name="virtual_available" position="after"> |
45 |
| - <field name="immediately_usable_qty" /> |
46 |
| - </field> |
47 |
| - </field> |
48 |
| - </record> |
49 |
| - <record model="ir.ui.view" id="view_stock_available_kanban"> |
50 |
| - <field name="name">Quantity available to promise (kanban)</field> |
51 |
| - <field name="model">product.template</field> |
52 |
| - <field name="inherit_id" ref="stock.product_template_kanban_stock_view"/> |
53 |
| - <field name="arch" type="xml"> |
54 |
| - <ul position="inside"> |
55 |
| - <li t-if="record.type.raw_value == 'product'">Available to Promise: <field name="immediately_usable_qty"/> <field name="uom_id"/></li> |
56 |
| - </ul> |
57 |
| - </field> |
58 |
| - </record> |
| 47 | + </field> |
| 48 | + </record> |
| 49 | + <record model="ir.ui.view" id="view_stock_available_kanban"> |
| 50 | + <field name="name">Quantity available to promise (kanban)</field> |
| 51 | + <field name="model">product.template</field> |
| 52 | + <field name="inherit_id" ref="stock.product_template_kanban_stock_view"/> |
| 53 | + <field name="arch" type="xml"> |
| 54 | + <ul position="inside"> |
| 55 | + <li t-if="record.type.raw_value == 'product'">Available to Promise: <field name="immediately_usable_qty"/> <field name="uom_id"/></li> |
| 56 | + </ul> |
| 57 | + </field> |
| 58 | + </record> |
59 | 59 | </odoo>
|
0 commit comments