~openerp-commiter/openobject-addons/extra-6.0

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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
<?xml version="1.0"?>
<openerp>
<data>

    <!-- In the form view of Incoming/Outgoing products, make the tree view of move lines editable -->
    <record id="view_picking_in_form_editable_move_lines" model="ir.ui.view">
        <field name="name">view.picking.in.form.editable_move_lines</field>
        <field name="model">stock.picking</field>
        <field name="inherit_id" ref="stock.view_picking_in_form" />
        <field name="type">form</field>
        <field name="arch" type="xml">
            <xpath expr="/form/notebook/page/field/tree[@string='Stock Moves']" position="attributes">
                <attribute name="editable">bottom</attribute>
            </xpath>
        </field>
    </record>

    <record id="view_picking_out_form_editable_move_lines" model="ir.ui.view">
        <field name="name">view.picking.out.form.editable_move_lines</field>
        <field name="model">stock.picking</field>
        <field name="inherit_id" ref="stock.view_picking_out_form" />
        <field name="type">form</field>
        <field name="arch" type="xml">
            <xpath expr="/form/notebook/page/field/tree[@string='Stock Moves']" position="attributes">
                <attribute name="editable">bottom</attribute>
            </xpath>
        </field>
    </record>

    <!-- In the form view of Incoming products, add the "new_prodlot_code" fields -->
    <record id="view_picking_in_form_new_prodlot_code" model="ir.ui.view">
        <field name="name">view.picking.in.form.new_prodlot_code</field>
        <field name="model">stock.picking</field>
        <field name="inherit_id" ref="stock.view_picking_in_form" />
        <field name="type">form</field>
        <field name="arch" type="xml">
            <xpath expr="/form/notebook/page/field/tree/field[@name='prodlot_id']" position="before">
                <field name="new_prodlot_code" />
            </xpath>
        </field>
    </record>

    <!-- We should have both source stock + dest location in the form view of Incoming/Outgoing products -->
    <record id="view_picking_in_form_source_stock_location" model="ir.ui.view">
        <field name="name">view.picking.in.form.source_stock_location</field>
        <field name="model">stock.picking</field>
        <field name="inherit_id" ref="stock.view_picking_in_form" />
        <field name="type">form</field>
        <field name="arch" type="xml">
            <xpath expr="/form/notebook/page/field/tree/field[@name='location_dest_id']" position="before">
                <field name="location_id" />
            </xpath>
        </field>
    </record>

    <record id="view_picking_out_form_dest_stock_location" model="ir.ui.view">
        <field name="name">view.picking.out.form.dest_stock_location</field>
        <field name="model">stock.picking</field>
        <field name="inherit_id" ref="stock.view_picking_out_form" />
        <field name="type">form</field>
        <field name="arch" type="xml">
            <xpath expr="/form/notebook/page/field/tree/field[@name='location_id']" position="after">
                <field name="location_dest_id" />
            </xpath>
        </field>
    </record>

    <!-- Add "last_location_id" on prod lot view -->
     <record id="view_production_lot_form_unique_production_number" model="ir.ui.view">
         <field name="name">view_production_lot_form_unique_production_number</field>
         <field name="model">stock.production.lot</field>
         <field name="inherit_id" ref="stock.view_production_lot_form"/>
         <field name="type">form</field>
         <field name="arch" type="xml">
             <field name="stock_available" position="after">
                 <field name="last_location_id"/>
             </field>
         </field>
     </record>

	<!-- Wizard to help users input production lots in batch -->
<!-- TODO Nan-TIc : port to v6
	<record id="view_stock_picking_prodlot_selection" model="ir.ui.view">
		<field name="name">stock.picking.prodlot.selection</field>
		<field name="model">stock.picking.prodlot.selection</field>
		<field name="type">form</field>
		<field name="arch" type="xml">
			<form string="Select Production Lots">
				<field name="product_id" colspan="4"/>
				<field name="first_lot"/>
				<field name="last_lot"/>
				<button type="object" name="action_cancel" string="Cancel" icon="gtk-cancel" special="cancel" colspan="2"/>
				<button type="object" name="action_accept" string="Accept" icon="gtk-ok" colspan="2"/>
			</form>
		</field>
	</record>

	<record model="ir.actions.act_window" id="action_prodlot_selection">
		<field name="name">Select Production Lots</field>
		<field name="res_model">stock.picking.prodlot.selection</field>
		<field name="view_type">form</field>
		<field name="view_mode">form</field>
		<field name="target">new</field>
	</record>

	<record id="view_picking_form" model="ir.ui.view">
		<field name="name">stock.picking.form.prodlot.selection</field>
		<field name="model">stock.picking</field>
		<field name="type">form</field>
		<field name="inherit_id" ref="stock.view_picking_form"/>
		<field name="arch" type="xml">
			<xpath expr="/form/notebook/page/group/label[@colspan='6']" position="replace">
				<label colspan="5"/>
				<button type="action" name="%(action_prodlot_selection)d" string="Spread Production Lots" states="draft,confirmed,assigned"/>
			</xpath>
		</field>
	</record>

	<record id="view_picking_in_form" model="ir.ui.view">
		<field name="name">stock.picking.in.form.prodlot.selection</field>
		<field name="model">stock.picking</field>
		<field name="type">form</field>
		<field name="inherit_id" ref="stock.view_picking_in_form"/>
		<field name="arch" type="xml">
			<xpath expr="/form/notebook/page/group/label[@colspan='5']" position="replace">
				<label colspan="4"/>
				<button type="action" name="%(action_prodlot_selection)d" string="Spread Production Lots" states="draft,confirmed,assigned"/>
			</xpath>
		</field>
	</record>

	<record id="view_picking_out_form" model="ir.ui.view">
		<field name="name">stock.picking.out.form</field>
		<field name="model">stock.picking</field>
		<field name="type">form</field>
		<field name="inherit_id" ref="stock.view_picking_out_form"/>
		<field name="arch" type="xml">
			<xpath expr="/form/notebook/page/group/label[@colspan='6']" position="replace">
				<label colspan="5"/>
				<button type="action" name="%(action_prodlot_selection)d" string="Spread Production Lots" states="draft,confirmed,assigned"/>
			</xpath>
		</field>
	</record>

	<record id="view_picking_delivery_form" model="ir.ui.view">
		<field name="name">stock.picking.delivery.form</field>
		<field name="model">stock.picking</field>
		<field name="type">form</field>
		<field name="inherit_id" ref="stock.view_picking_delivery_form"/>
		<field name="arch" type="xml">
			<xpath expr="/form/notebook/page/group/label[@colspan='6']" position="replace">
				<label colspan="5"/>
				<button type="action" name="%(action_prodlot_selection)d" string="Spread Production Lots" states="draft,confirmed,assigned"/>
			</xpath>
		</field>
	</record>
-->

</data>
</openerp>