|
1 |
| -<?xml version="1.0" encoding="utf-8"?> |
| 1 | +<?xml version="1.0" encoding="utf-8" ?> |
2 | 2 | <!-- Copyright 2014 Numérigraphe
|
3 | 3 | Copyright 2016 Sodexis
|
4 | 4 | License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -->
|
5 |
| - |
6 | 5 | <odoo>
|
7 | 6 | <record model="ir.ui.view" id="product_normal_form_view">
|
8 | 7 | <field name="name">Quantity available to promise (variant tree)</field>
|
9 | 8 | <field name="model">product.product</field>
|
10 | 9 | <field name="inherit_id" ref="stock.product_form_view_procurement_button" />
|
11 | 10 | <field name="arch" type="xml">
|
12 |
| - <xpath expr="//button[@name='%(stock.action_stock_level_forecast_report_product)d']" |
13 |
| - position="after"> |
14 |
| - <button type="action" name="%(stock.product_open_quants)d" |
| 11 | + <xpath |
| 12 | + expr="//button[@name='action_product_forecast_report']" |
| 13 | + position="after" |
| 14 | + > |
| 15 | + <button |
| 16 | + type="object" |
| 17 | + name="action_open_quants" |
15 | 18 | attrs="{'invisible':[('type', 'not in', ['product','consu'])]}"
|
16 |
| - class="oe_stat_button" icon="fa-building-o"> |
17 |
| - <div class="o_field_widget o_stat_info"> |
18 |
| - <span class="o_stat_value" widget="statinfo"> |
19 |
| - <field name="immediately_usable_qty" widget="statinfo" nolabel="1" class="mr4"/> |
20 |
| - <field name="uom_name"/> |
21 |
| - </span> |
22 |
| - <span class="o_stat_text">Available</span> |
23 |
| - </div> |
| 19 | + class="oe_stat_button" |
| 20 | + icon="fa-building-o" |
| 21 | + > |
| 22 | + <div class="o_field_widget o_stat_info"> |
| 23 | + <span class="o_stat_value" widget="statinfo"> |
| 24 | + <field |
| 25 | + name="immediately_usable_qty" |
| 26 | + widget="statinfo" |
| 27 | + nolabel="1" |
| 28 | + class="mr4" |
| 29 | + /> |
| 30 | + <field name="uom_name" /> |
| 31 | + </span> |
| 32 | + <span class="o_stat_text">Available</span> |
| 33 | + </div> |
24 | 34 | </button>
|
25 |
| - <button type="action" name="%(stock.product_open_quants)d" |
| 35 | + <button |
| 36 | + type="object" |
| 37 | + name="action_open_quants" |
26 | 38 | attrs="{'invisible':[('type', 'not in', ['product','consu'])]}"
|
27 |
| - class="oe_stat_button" icon="fa-building-o"> |
28 |
| - <div class="o_field_widget o_stat_info"> |
29 |
| - <span class="o_stat_value" widget="statinfo"> |
30 |
| - <field name="potential_qty" widget="statinfo" nolabel="1" class="mr4"/> |
31 |
| - <field name="uom_name"/> |
32 |
| - </span> |
33 |
| - <span class="o_stat_text">Potential</span> |
34 |
| - </div> |
| 39 | + class="oe_stat_button" |
| 40 | + icon="fa-building-o" |
| 41 | + > |
| 42 | + <div class="o_field_widget o_stat_info"> |
| 43 | + <span class="o_stat_value" widget="statinfo"> |
| 44 | + <field |
| 45 | + name="potential_qty" |
| 46 | + widget="statinfo" |
| 47 | + nolabel="1" |
| 48 | + class="mr4" |
| 49 | + /> |
| 50 | + <field name="uom_name" /> |
| 51 | + </span> |
| 52 | + <span class="o_stat_text">Potential</span> |
| 53 | + </div> |
35 | 54 | </button>
|
36 | 55 | </xpath>
|
37 | 56 | </field>
|
38 | 57 | </record>
|
39 | 58 | <record model="ir.ui.view" id="view_stock_available_product_tree">
|
40 | 59 | <field name="name">Quantity available to promise (variant tree)</field>
|
41 | 60 | <field name="model">product.product</field>
|
42 |
| - <field name="inherit_id" ref="stock.view_stock_product_tree"/> |
| 61 | + <field name="inherit_id" ref="stock.view_stock_product_tree" /> |
43 | 62 | <field name="arch" type="xml">
|
44 | 63 | <tree position="attributes">
|
45 |
| - <attribute name="decoration-danger">virtual_available<0 or immediately_usable_qty<0</attribute> |
46 |
| - <attribute name="decoration-info">virtual_available>=0 or immediately_usable_qty>0</attribute> |
| 64 | + <attribute |
| 65 | + name="decoration-danger" |
| 66 | + >virtual_available<0 or immediately_usable_qty<0</attribute> |
| 67 | + <attribute |
| 68 | + name="decoration-info" |
| 69 | + >virtual_available>=0 or immediately_usable_qty>0</attribute> |
47 | 70 | </tree>
|
48 | 71 | <field name="virtual_available" position="after">
|
49 |
| - <field name="immediately_usable_qty" /> |
| 72 | + <field name="immediately_usable_qty" /> |
50 | 73 | </field>
|
51 | 74 | </field>
|
52 | 75 | </record>
|
|
0 commit comments