1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
|
<?xml version="1.0"?>
<odoo>
<data>
<record id="view_order_form_inherit_sale_stock" model="ir.ui.view">
<field name="name">sale.order.form.sale.stock</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
<xpath expr="//button[@name='action_view_invoice']" position="before">
<field name="picking_ids" invisible="1"/>
<button type="object"
name="action_view_delivery"
class="oe_stat_button"
icon="fa-truck"
attrs="{'invisible': [('delivery_count', '=', 0)]}" groups="base.group_user">
<field name="delivery_count" widget="statinfo" string="Delivery"/>
</button>
</xpath>
<xpath expr="//group[@name='sale_shipping']" position="attributes">
<attribute name="groups"></attribute><!-- Remove the res.group on the group and set it on the field directly-->
<attribute name="string">Delivery</attribute>
</xpath>
<xpath expr="//label[@for='commitment_date']" position="before">
<field name="warehouse_id" options="{'no_create': True}" groups="stock.group_stock_multi_warehouses" force_save="1"/>
<field name="incoterm" widget="selection" groups="sale_stock.group_display_incoterm"/>
<field name="picking_policy" required="True"/>
</xpath>
<xpath expr="//span[@name='expected_date_span']" position="attributes">
<attribute name="attrs">
{'invisible': [('effective_date', '!=', False), ('commitment_date', '!=', False)]}
</attribute>
</xpath>
<xpath expr="//div[@name='commitment_date_div']" position="replace">
<div class="o_row">
<field name="commitment_date"/>
<span class="text-muted" attrs="{'invisible': [('effective_date', '!=', False), ('commitment_date', '!=', False)]}">Expected: <field name="expected_date" widget="date"/></span>
</div>
<field name="effective_date" attrs="{'invisible': [('effective_date', '=', False)]}"/>
</xpath>
<xpath expr="//page[@name='other_information']//field[@name='expected_date']" position="after">
<field name="show_json_popover" invisible="1"/>
<field string=" " name="json_popover" widget="stock_rescheduling_popover" attrs="{'invisible': [('show_json_popover', '=', False)]}"/>
</xpath>
<xpath expr="//page/field[@name='order_line']/form/group/group/field[@name='price_unit']" position="before">
<field name="product_packaging" attrs="{'invisible': [('product_id', '=', False)]}" context="{'default_product_id': product_id, 'tree_view_ref':'product.product_packaging_tree_view', 'form_view_ref':'product.product_packaging_form_view'}" domain="[('product_id','=',product_id)]" groups="product.group_stock_packaging" />
</xpath>
<xpath expr="//page/field[@name='order_line']/tree/field[@name='price_unit']" position="before">
<field name="product_packaging" attrs="{'invisible': [('product_id', '=', False)]}" context="{'default_product_id': product_id, 'tree_view_ref':'product.product_packaging_tree_view', 'form_view_ref':'product.product_packaging_form_view'}" domain="[('product_id','=',product_id)]" groups="product.group_stock_packaging" optional="show"/>
</xpath>
<xpath expr="//field[@name='order_line']/form/group/group/field[@name='analytic_tag_ids']" position="before">
<field name="route_id" groups="stock.group_adv_location" options="{'no_create': True}"/>
</xpath>
<xpath expr="//field[@name='order_line']/tree/field[@name='analytic_tag_ids']" position="after">
<field name="route_id" groups="stock.group_adv_location" options="{'no_create': True}" optional="hide"/>
</xpath>
</field>
</record>
<record id="view_quotation_tree" model="ir.ui.view">
<field name="name">sale.order.tree.inherit.sale.stock</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_quotation_tree"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='tag_ids']" position="after">
<field name="warehouse_id" options="{'no_create': True}" groups="stock.group_stock_multi_warehouses" optional="hide" />
</xpath>
</field>
</record>
<record id="view_order_tree" model="ir.ui.view">
<field name="name">sale.order.tree.inherit.sale.stock</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_tree"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='team_id']" position="after">
<field name="warehouse_id" options="{'no_create': True}" groups="stock.group_stock_multi_warehouses" optional="hide"/>
</xpath>
</field>
</record>
<record id="view_order_line_tree_inherit_sale_stock" model="ir.ui.view">
<field name="name">sale.order.line.tree.sale.stock.location</field>
<field name="inherit_id" ref="sale.view_order_line_tree"/>
<field name="model">sale.order.line</field>
<field name="arch" type="xml">
<xpath expr="//field[@name='price_subtotal']" position="before">
<field name="route_id" groups="stock.group_adv_location" options="{'no_create': True}"/>
</xpath>
</field>
</record>
<record id="view_order_form_inherit_sale_stock_qty" model="ir.ui.view">
<field name="name">sale.order.line.tree.sale.stock.qty</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="model">sale.order</field>
<field name="arch" type="xml">
<xpath expr="//page/field[@name='order_line']/form/group/group/div[@name='ordered_qty']/field[@name='product_uom']" position="after">
<!-- below fields are used in the widget qty_at_date_widget -->
<field name="product_type" invisible="1"/>
<field name="virtual_available_at_date" invisible="1"/>
<field name="qty_available_today" invisible="1"/>
<field name="free_qty_today" invisible="1"/>
<field name="scheduled_date" invisible="1"/>
<field name="forecast_expected_date" invisible="1"/>
<field name="warehouse_id" invisible="1"/>
<field name="qty_to_deliver" invisible="1"/>
<field name="is_mto" invisible="1"/>
<field name="display_qty_widget" invisible="1"/>
<widget name="qty_at_date_widget" width="0.1"/>
</xpath>
<xpath expr="//page/field[@name='order_line']/tree/field[@name='qty_delivered']" position="after">
<!-- below fields are used in the widget qty_at_date_widget -->
<field name="product_type" invisible="1"/>
<field name="virtual_available_at_date" invisible="1"/>
<field name="qty_available_today" invisible="1"/>
<field name="free_qty_today" invisible="1"/>
<field name="scheduled_date" invisible="1"/>
<field name="forecast_expected_date" invisible="1"/>
<field name="warehouse_id" invisible="1"/>
<field name="qty_to_deliver" invisible="1"/>
<field name="is_mto" invisible="1"/>
<field name="display_qty_widget" invisible="1"/>
<widget name="qty_at_date_widget" width="20px"/>
</xpath>
</field>
</record>
<template id="sale_order_line_view_list" name="sale.order.line.view.list" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<script type="text/javascript" src="/sale_stock/static/src/js/qty_at_date_widget.js"></script>
</xpath>
</template>
</data>
</odoo>
|