~unifield-team/unifield-wm/us-671-homere

« back to all changes in this revision

Viewing changes to specific_rules/specific_rules_view.xml

  • Committer: jf
  • Date: 2012-04-17 15:29:16 UTC
  • mfrom: (631.3.7 UF_828)
  • Revision ID: jf@tempo4-20120417152916-svm6ioq8ur2bi5tu
UF-955 [DEV] Reporting (Month-end) - 2 remaining reports
lp:~unifield-team/unifield-wm/UF_955

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<openerp>
3
 
<data>
4
 
 
5
 
        <delete model="ir.actions.act_window" id="stock.act_stock_product_location_open" />
6
 
 
 
3
        <data>
 
4
 
 
5
        <delete model="ir.actions.act_window" id="stock.act_stock_product_location_open" /> 
 
6
        
7
7
        <record id="action_server_stock_by_location" model="ir.actions.server">
8
8
            <field name="name">Stock by Location</field>
9
9
            <field name="model_id" ref="model_product_product"/>
17
17
            <field name="name">Stock by Location</field>
18
18
            <field eval="'ir.actions.server,%d'%action_server_stock_by_location" name="value"/>
19
19
            <field eval="True" name="object"/>
20
 
            <field eval="1" name="sequence"/>
21
20
        </record>
22
21
 
23
 
        <record id="view_location_tree2" model="ir.ui.view">
 
22
        <delete model="ir.model.data" id="stock.act_stock_product_location_open" />
 
23
 
 
24
                <record id="view_location_tree2" model="ir.ui.view">
24
25
            <field name="name">stock.location.tree</field>
25
26
            <field name="model">stock.location</field>
26
27
            <field name="type">tree</field>
27
28
            <field name="priority" eval="2"/>
28
29
            <field name="inherit_id" ref="stock.view_location_tree2" />
29
30
            <field name="arch" type="xml">
30
 
                <data>
31
 
                    <xpath expr="/tree" position="attributes">
32
 
                        <attribute name="hide_new_button">not context.get('from_advanced_menu')</attribute>
33
 
                    </xpath>
34
 
 
35
 
                    <field name="stock_real" position="replace">
36
 
                        <field name="stock_real" invisible="'product_id' not in context or 'specific_rules_tree_view' in context"/>
37
 
                        <field name="stock_real_specific" invisible="'specific_rules_tree_view' not in context" />
38
 
                    </field>
39
 
 
40
 
                    <field name="stock_virtual" position="replace">
41
 
                        <field name="stock_virtual" invisible="'product_id' not in context or 'specific_rules_tree_view' in context"/>
42
 
                        <field name="stock_virtual_specific" invisible="'specific_rules_tree_view' not in context" />
43
 
                    </field>
44
 
                </data>
 
31
                <data>
 
32
                
 
33
                                        <field name="stock_real" position="replace">
 
34
                                                <field name="stock_real" invisible="'product_id' not in context or 'specific_rules_tree_view' in context"/>
 
35
                                                <field name="stock_real_specific" invisible="'specific_rules_tree_view' not in context" />
 
36
                                        </field>
 
37
                                        
 
38
                                        <field name="stock_virtual" position="replace">
 
39
                                                <field name="stock_virtual" invisible="'product_id' not in context or 'specific_rules_tree_view' in context"/>
 
40
                                                <field name="stock_virtual_specific" invisible="'specific_rules_tree_view' not in context" />
 
41
                                        </field>
 
42
                
 
43
                </data>
45
44
            </field>
46
45
        </record>
47
46
 
48
 
        <record id="product_normal_form_view" model="ir.ui.view">
 
47
                <record id="product_normal_form_view" model="ir.ui.view">
49
48
            <field name="name">product.normal.form</field>
50
49
            <field name="model">product.product</field>
51
50
            <field name="type">form</field>
52
51
            <field eval="300" name="priority"/>
53
52
            <field name="inherit_id" ref="product_expiry.view_product_form_expiry" />
54
53
            <field name="arch" type="xml">
55
 
                <data>
56
 
 
57
 
                <field name="life_time" position="replace">
58
 
                    <field name="life_time" attrs="{'required':[('short_shelf_life', '=', True)]}" />
59
 
                </field>
 
54
                <data>
 
55
            
 
56
                    <field name="life_time" position="replace">
 
57
                        <field name="life_time" attrs="{'required':[('short_shelf_life', '=', True)]}" />
 
58
                    </field>
 
59
            
60
60
            </data>
61
61
            </field>
62
62
        </record>
63
 
 
64
 
        <record id="view_order_form" model="ir.ui.view">
65
 
            <field name="name">sale.order.form</field>
66
 
            <field name="model">sale.order</field>
67
 
            <field name="type">form</field>
68
 
            <field name="priority" eval="250" />
69
 
            <field name="inherit_id" ref="sale.view_order_form" />
70
 
            <field name="arch" type="xml">
71
 
                <data>
72
 
 
73
 
                    <xpath expr="//form[@string='Sales Order']//tree[@string='Sales Order Lines']/field[@name='product_uom']" position="after">
74
 
                        <field name="kc_dg" />
75
 
                    </xpath>
76
 
 
77
 
                </data>
 
63
            
 
64
                <record id="view_order_form" model="ir.ui.view">
 
65
                        <field name="name">sale.order.form</field>
 
66
                        <field name="model">sale.order</field>
 
67
                        <field name="type">form</field>
 
68
                        <field name="priority" eval="250" />
 
69
                        <field name="inherit_id" ref="sale.view_order_form" />
 
70
                        <field name="arch" type="xml">
 
71
                                <data>
 
72
                                
 
73
                                        <xpath expr="//form[@string='Sales Order']//tree[@string='Sales Order Lines']/field[@name='product_uom']" position="after">
 
74
                                                <field name="kc_dg" />
 
75
                                        </xpath>
 
76
                
 
77
                </data>
78
78
            </field>
79
79
        </record>
80
 
 
 
80
        
81
81
        <record id="purchase_order_form" model="ir.ui.view">
82
 
            <field name="name">purchase.order.form</field>
83
 
            <field name="model">purchase.order</field>
84
 
            <field name="type">form</field>
85
 
            <field name="inherit_id" ref="purchase.purchase_order_form" />
86
 
            <field name="arch" type="xml">
87
 
                <data>
88
 
                    <xpath expr="/form/notebook/page/field[@name='order_line']/tree/field[@name='product_uom']" position="after">
89
 
                        <field name="kc_dg" />
90
 
                    </xpath>
91
 
 
92
 
                </data>
93
 
            </field>
94
 
        </record>
95
 
 
96
 
        <record id="view_production_lot_tree" model="ir.ui.view">
 
82
                        <field name="name">purchase.order.form</field>
 
83
                        <field name="model">purchase.order</field>
 
84
                        <field name="type">form</field>
 
85
                        <field name="inherit_id" ref="purchase.purchase_order_form" />
 
86
                        <field name="arch" type="xml">
 
87
                                <data>
 
88
                                
 
89
                                        <xpath expr="//form[@string='Purchase Order']//tree[@string='Purchase Order Lines']/field[@name='product_uom']" position="after">
 
90
                                                <field name="kc_dg" />
 
91
                                        </xpath>
 
92
                
 
93
                </data>
 
94
            </field>
 
95
        </record>
 
96
        
 
97
        <record id="view_picking_form" model="ir.ui.view">
 
98
            <field name="name">stock.picking.form</field>
 
99
            <field name="model">stock.picking</field>
 
100
            <field name="type">form</field>
 
101
            <field name="inherit_id" ref="stock.view_picking_form" />
 
102
            <field eval="12" name="priority"/>
 
103
            <field name="arch" type="xml">
 
104
                <data>
 
105
                                        
 
106
                                        <xpath expr="//form[@string='Stock Moves']//field[@name='product_id']" position="replace">
 
107
                                <field name="product_id" context="{'location': location_id, 'prodlot_id': prodlot_id, 'compute_child': False}" on_change="onchange_product_id(product_id,location_id,location_dest_id, parent.address_id)" colspan="4" />
 
108
                        </xpath>
 
109
                        
 
110
                                        <xpath expr="//form[@string='Stock Moves']//field[@name='prodlot_id']" position="replace">
 
111
                        <field name="prodlot_id" groups="base.group_extended"
 
112
                                context="{'location_id':location_id, 'product_id':product_id, 'hidden_perishable_mandatory': hidden_perishable_mandatory,
 
113
                                                  'search_default_real': True}"
 
114
                                domain="[('product_id','=?',product_id), ('check_type','=', True)]"
 
115
                                on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id, product_uom)" colspan="3"
 
116
                                attrs="{'readonly': [('hidden_batch_management_mandatory','=',False), ('hidden_perishable_mandatory','=',False)]}" />
 
117
                            <field name="hidden_batch_management_mandatory" invisible="True" />
 
118
                            <field name="hidden_perishable_mandatory" invisible="True" />
 
119
                                                <field name="expired_date" />
 
120
                                                <field name="lot_check" />
 
121
                                <field name="exp_check" />
 
122
                                <field name="kc_check" />
 
123
                                        <field name="ssl_check" invisible="True" />
 
124
                                        <field name="dg_check" />
 
125
                                        <field name="np_check" />
 
126
                                        </xpath>
 
127
                                        
 
128
                                        <xpath expr="//tree[@string='Stock Moves']//field[@name='prodlot_id']" position="after">
 
129
                                                <field name="expired_date" />
 
130
                                        </xpath>
 
131
                                        
 
132
                                        <xpath expr="//tree[@string='Stock Moves']//field[@name='state']" position="after">
 
133
                                        <field name="lot_check" />
 
134
                                <field name="exp_check" />
 
135
                                <field name="kc_check" />
 
136
                                        <field name="ssl_check" invisible="True" />
 
137
                                        <field name="dg_check" />
 
138
                                        <field name="np_check" />
 
139
                                        </xpath>
 
140
                                        
 
141
                                        <!-- MERGED FROM REASON_TYPES_MOVES "usage in" -->
 
142
                                        <xpath expr="//form[@string='Stock Moves']//field[@name='location_id']" position="replace">
 
143
                                                <field name="location_id" domain="[('usage','in',('internal', 'procurement', 'production'))]"
 
144
                                                                context="{'specific_rules_tree_view': True, 'prodlot_id': prodlot_id, 'product_id': product_id, 'compute_child': False}" />
 
145
                        </xpath>
 
146
                
 
147
                </data>
 
148
            </field>
 
149
                </record>
 
150
                
 
151
                <record id="view_picking_out_form" model="ir.ui.view">
 
152
            <field name="name">stock.picking.out.form</field>
 
153
            <field name="model">stock.picking</field>
 
154
            <field name="type">form</field>
 
155
            <field name="inherit_id" ref="stock.view_picking_out_form" />
 
156
            <field name="arch" type="xml">
 
157
                <data>
 
158
                
 
159
                        <xpath expr="//form[@string='Stock Moves']//field[@name='product_id']" position="replace">
 
160
                                <field name="product_id" context="{'location': location_id, 'prodlot_id': prodlot_id, 'compute_child': False}" on_change="onchange_product_id(product_id,location_id,location_dest_id, parent.address_id)" colspan="4" />
 
161
                        </xpath>
 
162
                        
 
163
                                        <xpath expr="//form[@string='Stock Moves']//field[@name='prodlot_id']" position="replace">
 
164
                        <field name="prodlot_id" groups="base.group_extended"
 
165
                                context="{'location_id':location_id, 'product_id':product_id, 'hidden_perishable_mandatory': hidden_perishable_mandatory,
 
166
                                                  'search_default_real': True}"
 
167
                                domain="[('product_id','=?',product_id), ('check_type','=', True)]"
 
168
                                on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id, product_uom)" colspan="3"
 
169
                                attrs="{'readonly': [('hidden_batch_management_mandatory','=',False), ('hidden_perishable_mandatory','=',False)]}" />
 
170
                            <field name="hidden_batch_management_mandatory" invisible="True" />
 
171
                            <field name="hidden_perishable_mandatory" invisible="True" />
 
172
                                                <field name="expired_date" />
 
173
                                                <field name="lot_check" />
 
174
                                <field name="exp_check" />
 
175
                                <field name="kc_check" />
 
176
                                        <field name="ssl_check" invisible="True" />
 
177
                                        <field name="dg_check" />
 
178
                                        <field name="np_check" />
 
179
                                        </xpath>
 
180
                                        
 
181
                                        <xpath expr="//tree[@string='Stock Moves']//field[@name='prodlot_id']" position="after">
 
182
                                                <field name="expired_date" />
 
183
                                        </xpath>
 
184
                                        
 
185
                                        <xpath expr="//tree[@string='Stock Moves']//field[@name='state']" position="after">
 
186
                                        <field name="lot_check" />
 
187
                                <field name="exp_check" />
 
188
                                <field name="kc_check" />
 
189
                                        <field name="ssl_check" invisible="True" />
 
190
                                        <field name="dg_check" />
 
191
                                        <field name="np_check" />
 
192
                                        </xpath>
 
193
                                        
 
194
                                        <!-- MERGED FROM SPECIFIC_LOCATIONS (quarantine domain) -->
 
195
                                        <xpath expr="//form[@string='Stock Moves']//field[@name='location_id']" position="replace">
 
196
                                                <field name="location_id" domain="[('usage','=','internal'), ('quarantine_location', '=', False)]"
 
197
                                                                context="{'specific_rules_tree_view': True, 'prodlot_id': prodlot_id, 'product_id': product_id, 'compute_child': False}" />
 
198
                        </xpath>
 
199
                        
 
200
                        <button name="%(stock.action_partial_move_server)d" position="attributes">
 
201
                                <attribute name="invisible">1</attribute>
 
202
                        </button>
 
203
                
 
204
                </data>
 
205
            </field>
 
206
                </record>
 
207
                <!--
 
208
                <record id="view_location_search" model="ir.ui.view">
 
209
            <field name="name">stock.location.search</field>
 
210
            <field name="model">stock.location</field>
 
211
            <field name="type">search</field>
 
212
            <field name="arch" type="xml">
 
213
                <data>
 
214
                
 
215
                        <field name="name" position="after">
 
216
                                <separator orientation="vertical"/>
 
217
                                <filter icon="terp-check" name="real"
 
218
                                string="Real" domain="[('usage', '=', 'supplier')]" help="Supplier Locations" />
 
219
                        </field>
 
220
                
 
221
                </data>
 
222
                    <filter icon="terp-go-home" name="in_location"
 
223
                        string="Internal" domain="[('usage', '=', 'internal')]" help="Internal Locations" />
 
224
                    <filter icon="terp-personal" name="customer"
 
225
                        string="Customer" domain="[('usage', '=', 'customer')]" help="Customer Locations" />
 
226
                    <filter icon="terp-personal" name="supplier"
 
227
                        string="Supplier" domain="[('usage', '=', 'supplier')]" help="Supplier Locations" />
 
228
                    <separator orientation="vertical"/>
 
229
                    <field name="name"/>
 
230
            </field>
 
231
        </record>
 
232
                -->
 
233
                <record id="view_picking_in_form" model="ir.ui.view">
 
234
            <field name="name">stock.picking.in.form</field>
 
235
            <field name="model">stock.picking</field>
 
236
            <field name="type">form</field>
 
237
            <field name="inherit_id" ref="stock.view_picking_in_form" />
 
238
            <field name="arch" type="xml">
 
239
                <data>
 
240
                
 
241
                        <xpath expr="//form[@string='Stock Moves']//field[@name='product_id']" position="replace">
 
242
                                <field name="product_id" context="{'location': location_id, 'prodlot_id': prodlot_id, 'compute_child': False}" on_change="onchange_product_id(product_id,location_id,location_dest_id, parent.address_id)" colspan="4" />
 
243
                        </xpath>
 
244
                        
 
245
                                        <xpath expr="//form[@string='Stock Moves']//field[@name='prodlot_id']" position="replace">
 
246
                        <field name="prodlot_id" groups="base.group_extended"
 
247
                                context="{'location_id':location_id, 'product_id':product_id, 'hidden_perishable_mandatory': hidden_perishable_mandatory}"
 
248
                                domain="[('product_id','=?',product_id), ('check_type','=', True)]"
 
249
                                on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id, product_uom)" colspan="3"
 
250
                                attrs="{'readonly': [('hidden_batch_management_mandatory','=',False), ('hidden_perishable_mandatory','=',False)]}" />
 
251
                            <field name="hidden_batch_management_mandatory" invisible="True" />
 
252
                            <field name="hidden_perishable_mandatory" invisible="True" />
 
253
                                                <field name="expired_date" />
 
254
                                                <field name="lot_check" />
 
255
                                <field name="exp_check" />
 
256
                                <field name="kc_check" />
 
257
                                        <field name="ssl_check" invisible="True" />
 
258
                                        <field name="dg_check" />
 
259
                                        <field name="np_check" />
 
260
                                        </xpath>
 
261
                                        
 
262
                                        <xpath expr="//tree[@string='Stock Moves']//field[@name='prodlot_id']" position="after">
 
263
                                                <field name="expired_date" />
 
264
                                        </xpath>
 
265
                                        
 
266
                                        <xpath expr="//tree[@string='Stock Moves']//field[@name='state']" position="after">
 
267
                                        <field name="lot_check" />
 
268
                                <field name="exp_check" />
 
269
                                <field name="kc_check" />
 
270
                                        <field name="ssl_check" invisible="True" />
 
271
                                        <field name="dg_check" />
 
272
                                        <field name="np_check" />
 
273
                                        </xpath>
 
274
                                        
 
275
                                        <!-- MERGED FROM SPECIFIC_LOCATIONS (quarantine domain) -->
 
276
                                        <xpath expr="//form[@string='Stock Moves']//field[@name='location_id']" position="replace">
 
277
                                                <field name="location_id" domain="[('usage','&lt;&gt;','view'), ('quarantine_location', '=', False)]"
 
278
                                                                context="{'specific_rules_tree_view': True, 'prodlot_id': prodlot_id, 'product_id': product_id, 'compute_child': False}" />
 
279
                        </xpath>
 
280
                
 
281
                </data>
 
282
            </field>
 
283
                </record>
 
284
                
 
285
                <record id="view_production_lot_tree" model="ir.ui.view">
97
286
            <field name="name">stock.production.lot.tree</field>
98
287
            <field name="model">stock.production.lot</field>
99
288
            <field name="type">tree</field>
103
292
 
104
293
                    <xpath expr="/tree" position="attributes">
105
294
                        <attribute name="string">Batch numbers</attribute>
106
 
                        <attribute name="hide_delete_button">1</attribute>
107
 
                        <attribute name="colors">red:life_date &lt; current_date</attribute>
108
295
                    </xpath>
109
 
                    <field name="ref" position="replace">
110
 
                        <field name="partner_name"/>
111
 
                        <field name="type" />
112
 
                        <field name="life_date" />
113
 
                    </field>
114
 
 
115
 
                    <field name="prefix" position="replace" />
116
 
 
117
 
                    <field name="stock_available" position="after">
118
 
                        <field name="stock_virtual" />
119
 
                    </field>
120
 
 
121
 
                    <field name="date" position="after">
122
 
                        <field name="delete_ok" invisible="1" />
123
 
                        <button name="unlink" string="Delete" icon="gtk-del" type="object" attrs="{'invisible': [('delete_ok', '=', False)]}" confirm="Do you really want to delete selected record(s) ?" />
124
 
                    </field>
125
 
                </data>
 
296
                
 
297
                        <field name="ref" position="replace">
 
298
                                <field name="type" />
 
299
                                <field name="life_date" />
 
300
                        </field>
 
301
                        
 
302
                        <field name="prefix" position="replace" />
 
303
                        
 
304
                        <field name="stock_available" position="after">
 
305
                                <field name="stock_virtual" />
 
306
                        </field>
 
307
                
 
308
                </data>
126
309
            </field>
127
310
        </record>
128
 
 
 
311
        
129
312
        <record id="view_production_lot_expiry_date_tree" model="ir.ui.view">
130
313
            <field name="name">stock.production.lot.expiry.date.tree</field>
131
314
            <field name="model">stock.production.lot</field>
132
 
            <field name="priority">99</field>
133
315
            <field name="type">tree</field>
134
 
            <field name="priority" eval="200" />
135
316
            <field name="arch" type="xml">
136
 
                <tree string="Expiry Dates" hide_new_button="True" hide_delete_button="True" colors="red:life_date &lt; current_date">
 
317
                <tree string="Expiry Dates">
137
318
                    <field name="prefix" invisible="True" />
138
319
                    <field name="type" invisible="True" />
139
 
                    <field name="life_date" />
140
 
                    <field name="name" />
 
320
                        <field name="life_date" />
 
321
                        <field name="name" />
141
322
                    <field name="product_id"/>
142
323
                    <field name="stock_available"/>
143
324
                    <field name="stock_virtual" />
145
326
                </tree>
146
327
            </field>
147
328
        </record>
148
 
 
 
329
        
149
330
        <record model="ir.ui.view" id="search_product_lot_filter">
150
331
            <field name="name">Batch Numbers Filter</field>
151
332
            <field name="model">stock.production.lot</field>
152
333
            <field name="type">search</field>
153
334
            <field name="inherit_id" ref="stock.search_product_lot_filter" />
154
335
            <field name="arch" type="xml">
155
 
                <data>
156
 
                    <filter name="available" position="replace">
157
 
                        <filter icon="terp-check" name="real" string="Real" domain="[('stock_available', '&gt;', 0)]" help="Real Stock" />
158
 
                        <filter icon="terp-check" name="virtual" string="Available" domain="[('stock_virtual', '&gt;', 0)]" help="Available Product Batch numbers" />
159
 
                    </filter>
160
 
                    <field name="prefix" position="replace" />
161
 
                    <field name="ref" position="replace" />
162
 
                    <field name="name" position="after">
163
 
                        <field name="type" />
164
 
                        <field name="life_date" />
165
 
                    </field>
166
 
                </data>
 
336
                <data>
 
337
                
 
338
                        <filter name="available" position="replace">
 
339
                                <filter icon="terp-check" name="real" string="Real" domain="[('stock_available', '&gt;', 0)]" help="Real Stock" />
 
340
                                <filter icon="terp-check" name="virtual" string="Available" domain="[('stock_virtual', '&gt;', 0)]" help="Available Product Batch numbers" />
 
341
                        </filter>
 
342
                        <field name="prefix" position="replace" />
 
343
                        <field name="ref" position="replace" />
 
344
                        <field name="name" position="after">
 
345
                                <field name="type" />
 
346
                                <field name="life_date" />
 
347
                        </field>
 
348
                
 
349
                </data>
167
350
            </field>
168
351
        </record>
169
 
 
 
352
        
170
353
        <record id="view_production_lot_form" model="ir.ui.view">
171
354
            <field name="name">stock.production.lot.form</field>
172
355
            <field name="model">stock.production.lot</field>
173
356
            <field name="type">form</field>
174
357
            <field name="inherit_id" ref="stock.view_production_lot_form" />
175
358
            <field name="arch" type="xml">
176
 
                <data>
177
 
 
178
 
                    <xpath expr="/form" position="attributes">
179
 
                        <attribute name="string">Batch number</attribute>
180
 
                        <attribute name="hide_delete_button">1</attribute>
181
 
                    </xpath>
 
359
                <data>
182
360
 
183
361
                    <xpath expr="/form//field[@name='product_id']" position="replace">
184
362
                        <field name="product_id" colspan="4" domain="[('batch_management', '=', True)]" />
187
365
                    <xpath expr="/form/group/separator" position="replace">
188
366
                        <separator string="Batch Number Identification" colspan="4"/>
189
367
                    </xpath>
190
 
 
191
 
                    <field name="stock_available" position="after">
192
 
                        <field name="stock_virtual" colspan="4" />
193
 
                    </field>
194
 
 
195
 
                    <field name="ref" position="after">
196
 
                        <field name="type" readonly="1" />
197
 
                    </field>
198
 
 
199
 
                    <field name="name" position="replace">
200
 
                        <field name="name" colspan="2" attrs="{'readonly': [('type', '=', 'internal')]}" />
201
 
                        <field name="partner_name" colspan="2" readonly='1'/>
202
 
                    </field>
203
 
 
204
 
                    <field name="date" position="replace">
205
 
                        <field name="date" colspan="2" />
206
 
                    </field>
207
 
 
208
 
                    <field name="prefix" position="replace" />
209
 
                    <field name="ref" position="replace" />
210
 
 
211
 
                </data>
 
368
                        
 
369
                        <field name="stock_available" position="after">
 
370
                                <field name="stock_virtual" colspan="4" />
 
371
                        </field>
 
372
                        
 
373
                        
 
374
                        <field name="ref" position="after">
 
375
                                <field name="type" readonly="1" />
 
376
                        </field>
 
377
                        
 
378
                        <field name="name" position="replace">
 
379
                                <field name="name" colspan="4" attrs="{'readonly': [('type', '=', 'internal')]}" />
 
380
                        </field>
 
381
                        
 
382
                        <field name="date" position="replace">
 
383
                                <field name="date" colspan="2" />
 
384
                        </field>
 
385
                        
 
386
                        <field name="prefix" position="replace" />
 
387
                        <field name="ref" position="replace" />
 
388
                
 
389
                </data>
212
390
            </field>
213
391
        </record>
214
 
 
 
392
        
215
393
        <record model="ir.ui.view" id="view_move_form_expiry">
216
394
            <field name="name">stock.production.lot.form</field>
217
395
            <field name="model">stock.production.lot</field>
218
396
            <field name="inherit_id" ref="product_expiry.view_move_form_expiry" />
219
397
            <field name="type">form</field>
220
398
            <field name="arch" type="xml">
221
 
            <data>
222
 
                <field name="use_date" position="replace" />
223
 
                <field name="removal_date" position="replace" />
224
 
                <field name="alert_date" position="replace" />
225
 
            </data>
 
399
                <data>
 
400
 
 
401
                        <field name="use_date" position="replace" />
 
402
                        <field name="removal_date" position="replace" />
 
403
                        <field name="alert_date" position="replace" />
 
404
                
 
405
                </data>
226
406
            </field>
227
407
        </record>
228
 
 
229
 
        <record id="view_move_form" model="ir.ui.view">
 
408
        
 
409
                <record id="view_move_form" model="ir.ui.view">
230
410
            <field name="name">stock.move.form</field>
231
411
            <field name="model">stock.move</field>
232
412
            <field name="type">form</field>
233
413
            <field eval="4" name="priority"/>
234
414
            <field name="inherit_id" ref="stock.view_move_form" />
235
415
            <field name="arch" type="xml">
236
 
            <data>
237
 
 
238
 
            <xpath expr="//field[@name='product_id']" position="attributes">
239
 
                <attribute name="context">{'location_id': location_id, 'prodlot_id': prodlot_id, 'compute_child': False}</attribute>
240
 
            </xpath>
241
 
 
242
 
                    <field name="prodlot_id" position="replace">
243
 
                        <field name="prodlot_id"
244
 
                            context="{'location_id':location_id, 'product_id':product_id, 'hidden_perishable_mandatory': hidden_perishable_mandatory}"
245
 
                            domain="[('product_id','=?',product_id), ('check_type','=', True)]"
246
 
                            on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id, product_uom)" colspan="3"
247
 
                            attrs="{'readonly': [('hidden_batch_management_mandatory','=',False), ('hidden_perishable_mandatory','=',False)]}" />
248
 
                        <field name="hidden_batch_management_mandatory" invisible="True" />
249
 
                        <field name="hidden_perishable_mandatory" invisible="True" />
250
 
                        <field name="expired_date" attrs="{'readonly': [('state', 'not in', ['draft', 'waiting', 'confirmed', 'assigned'])]}" />
251
 
                        <field name="lot_check" />
252
 
                        <field name="exp_check" />
253
 
                        <field name="kc_check" />
254
 
                        <field name="ssl_check" invisible="True" />
255
 
                        <field name="dg_check" />
256
 
                        <field name="np_check" />
257
 
 
258
 
                    </field>
259
 
 
260
 
                    <button name="action_done" position="attributes">
261
 
                        <attribute name="invisible">1</attribute>
262
 
                    </button>
263
 
 
264
 
                    <button name="force_assign" position="attributes">
265
 
                        <attribute name="invisible">1</attribute>
266
 
                    </button>
267
 
 
268
 
                    <button name="action_confirm" position="attributes">
269
 
                        <attribute name="invisible">1</attribute>
270
 
                    </button>
271
 
 
272
 
                </data>
 
416
                <data>
 
417
 
 
418
                        <xpath expr="//field[@name='product_id']" position="attributes">
 
419
                                <attribute name="context">{'location_id': location_id, 'prodlot_id': prodlot_id, 'compute_child': False}</attribute>
 
420
                        </xpath>
 
421
                
 
422
                        <field name="prodlot_id" position="replace">
 
423
                                <field name="prodlot_id" groups="base.group_extended"
 
424
                                context="{'location_id':location_id, 'product_id':product_id, 'hidden_perishable_mandatory': hidden_perishable_mandatory}"
 
425
                                domain="[('product_id','=?',product_id), ('check_type','=', True)]" 
 
426
                                on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id, product_uom)" colspan="3"
 
427
                                attrs="{'readonly': [('hidden_batch_management_mandatory','=',False), ('hidden_perishable_mandatory','=',False)]}" />
 
428
                            <field name="hidden_batch_management_mandatory" invisible="True" />
 
429
                            <field name="hidden_perishable_mandatory" invisible="True" />
 
430
                                                <field name="expired_date" attrs="{'readonly': [('state', 'not in', ['draft', 'waiting', 'confirmed', 'assigned'])]}" />
 
431
                                <field name="lot_check" />
 
432
                                <field name="exp_check" />
 
433
                                <field name="kc_check" />
 
434
                                        <field name="ssl_check" invisible="True" />
 
435
                                        <field name="dg_check" />
 
436
                                        <field name="np_check" />
 
437
                                        
 
438
                        </field>
 
439
                        
 
440
                        <button name="action_done" position="attributes">
 
441
                                <attribute name="invisible">1</attribute>
 
442
                        </button>
 
443
                        
 
444
                        <button name="force_assign" position="attributes">
 
445
                                <attribute name="invisible">1</attribute>
 
446
                        </button>
 
447
                        
 
448
                        <button name="action_confirm" position="attributes">
 
449
                                <attribute name="invisible">1</attribute>
 
450
                        </button>
 
451
                
 
452
                </data>
273
453
            </field>
274
454
        </record>
275
 
 
 
455
        
276
456
        <record id="view_move_form_reception_picking" model="ir.ui.view">
277
457
            <field name="name">stock.move.form2</field>
278
458
            <field name="model">stock.move</field>
280
460
            <field eval="6" name="priority"/>
281
461
            <field name="inherit_id" ref="stock.view_move_form_reception_picking" />
282
462
            <field name="arch" type="xml">
283
 
                <data>
284
 
 
285
 
            <xpath expr="//field[@name='product_id']" position="attributes">
286
 
                <attribute name="context">{'location_id': location_id, 'prodlot_id': prodlot_id, 'compute_child': False}</attribute>
287
 
            </xpath>
288
 
 
289
 
                    <field name="prodlot_id" position="replace">
290
 
                        <field name="prodlot_id"
291
 
                            context="{'location_id':location_id, 'product_id':product_id, 'hidden_perishable_mandatory': hidden_perishable_mandatory}"
292
 
                            domain="[('product_id','=?',product_id), ('check_type','=', True)]"
293
 
                            on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id, product_uom)" colspan="3"
294
 
                            attrs="{'readonly': [('hidden_batch_management_mandatory','=',False), ('hidden_perishable_mandatory','=',False)]}" />
295
 
                        <field name="hidden_batch_management_mandatory" invisible="True" />
296
 
                        <field name="hidden_perishable_mandatory" invisible="True" />
297
 
                        <field name="expired_date" attrs="{'readonly': [('state', 'not in', ['draft', 'waiting', 'confirmed', 'assigned'])]}" />
298
 
                        <field name="lot_check" />
299
 
                        <field name="exp_check" />
300
 
                        <field name="kc_check" />
301
 
                        <field name="ssl_check" invisible="True" />
302
 
                        <field name="dg_check" />
303
 
                        <field name="np_check" />
304
 
                    </field>
305
 
 
306
 
                    <button name="action_confirm" position="attributes">
307
 
                        <attribute name="invisible">1</attribute>
308
 
                    </button>
309
 
 
310
 
                    <button name="force_assign" position="attributes">
311
 
                        <attribute name="invisible">1</attribute>
312
 
                    </button>
313
 
 
314
 
 
315
 
                </data>
 
463
                <data>
 
464
 
 
465
                        <xpath expr="//field[@name='product_id']" position="attributes">
 
466
                                <attribute name="context">{'location_id': location_id, 'prodlot_id': prodlot_id, 'compute_child': False}</attribute>
 
467
                        </xpath>
 
468
                
 
469
                        <field name="prodlot_id" position="replace">
 
470
                                <field name="prodlot_id" groups="base.group_extended"
 
471
                                context="{'location_id':location_id, 'product_id':product_id, 'hidden_perishable_mandatory': hidden_perishable_mandatory}"
 
472
                                domain="[('product_id','=?',product_id), ('check_type','=', True)]"
 
473
                                on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id, product_uom)" colspan="3"
 
474
                                attrs="{'readonly': [('hidden_batch_management_mandatory','=',False), ('hidden_perishable_mandatory','=',False)]}" />
 
475
                            <field name="hidden_batch_management_mandatory" invisible="True" />
 
476
                            <field name="hidden_perishable_mandatory" invisible="True" />
 
477
                                                <field name="expired_date" attrs="{'readonly': [('state', 'not in', ['draft', 'waiting', 'confirmed', 'assigned'])]}" />
 
478
                                <field name="lot_check" />
 
479
                                <field name="exp_check" />
 
480
                                <field name="kc_check" />
 
481
                                        <field name="ssl_check" invisible="True" />
 
482
                                        <field name="dg_check" />
 
483
                                        <field name="np_check" />
 
484
                        </field>
 
485
                        
 
486
                        <button name="action_confirm" position="attributes">
 
487
                                <attribute name="invisible">1</attribute>
 
488
                        </button>
 
489
                        
 
490
                        <button name="force_assign" position="attributes">
 
491
                                <attribute name="invisible">1</attribute>
 
492
                        </button>
 
493
                        
 
494
                        <button name="%(stock.action_partial_move_server)d" position="attributes">
 
495
                                <attribute name="invisible">1</attribute>
 
496
                        </button>
 
497
                
 
498
                </data>
316
499
            </field>
317
500
        </record>
318
 
 
 
501
        
319
502
        <record id="stock_move_tree" model="ir.ui.view">
320
503
            <field name="name">Stock Moves</field>
321
504
            <field name="model">stock.move</field>
323
506
            <field name="field_parent">move_history_ids</field>
324
507
            <field name="inherit_id" ref="stock.stock_move_tree" />
325
508
            <field name="arch" type="xml">
326
 
            <data>
327
 
 
328
 
            <xpath expr="//field[@name='product_id']" position="attributes">
329
 
                <attribute name="context">{'location_id': location_id, 'prodlot_id': prodlot_id, 'compute_child': False}</attribute>
330
 
            </xpath>
331
 
 
332
 
                <button name="action_done" position="after">
333
 
                    <field name="lot_check" />
334
 
                    <field name="exp_check" />
335
 
                    <field name="kc_check" />
336
 
                    <field name="ssl_check" invisible="True" />
337
 
                    <field name="dg_check" />
338
 
                    <field name="np_check" />
339
 
                </button>
340
 
 
341
 
                <button name="action_done" position="attributes">
342
 
                    <attribute name="invisible">1</attribute>
343
 
                </button>
344
 
 
345
 
                </data>
346
 
            </field>
347
 
        </record>
348
 
 
349
 
        <record id="stock_move_tree2" model="ir.ui.view">
 
509
                <data>
 
510
 
 
511
                        <xpath expr="//field[@name='product_id']" position="attributes">
 
512
                                <attribute name="context">{'location_id': location_id, 'prodlot_id': prodlot_id, 'compute_child': False}</attribute>
 
513
                        </xpath>
 
514
                
 
515
                        <button name="action_done" position="after">
 
516
                                <field name="lot_check" />
 
517
                                <field name="exp_check" />
 
518
                                <field name="kc_check" />
 
519
                                        <field name="ssl_check" invisible="True" />
 
520
                                        <field name="dg_check" />
 
521
                                        <field name="np_check" />
 
522
                        </button>
 
523
                        
 
524
                        <button name="action_done" position="attributes">
 
525
                                <attribute name="invisible">1</attribute>
 
526
                        </button>
 
527
                
 
528
                </data>
 
529
                </field>
 
530
        </record>
 
531
        
 
532
        <record id="stock_move_tree2" model="ir.ui.view">
350
533
            <field name="name">Stock Moves</field>
351
534
            <field name="model">stock.move</field>
352
535
            <field name="type">tree</field>
353
536
            <field name="field_parent">move_history_ids2</field>
354
537
            <field name="inherit_id" ref="stock.stock_move_tree2" />
355
538
            <field name="arch" type="xml">
356
 
                <data>
357
 
 
358
 
            <xpath expr="//field[@name='product_id']" position="attributes">
359
 
                <attribute name="context">{'location_id': location_id, 'prodlot_id': prodlot_id, 'compute_child': False}</attribute>
360
 
            </xpath>
361
 
 
362
 
                    <field name="state" position="after">
363
 
                        <field name="lot_check" />
364
 
                        <field name="exp_check" />
365
 
                        <field name="kc_check" />
366
 
                        <field name="ssl_check" invisible="True" />
367
 
                        <field name="dg_check" />
368
 
                        <field name="np_check" />
369
 
                    </field>
370
 
 
371
 
                </data>
372
 
            </field>
373
 
        </record>
374
 
 
375
 
        <record id="view_move_tree" model="ir.ui.view">
 
539
                <data>
 
540
 
 
541
                        <xpath expr="//field[@name='product_id']" position="attributes">
 
542
                                <attribute name="context">{'location_id': location_id, 'prodlot_id': prodlot_id, 'compute_child': False}</attribute>
 
543
                        </xpath>
 
544
                
 
545
                        <field name="state" position="after">
 
546
                                <field name="lot_check" />
 
547
                                <field name="exp_check" />
 
548
                                <field name="kc_check" />
 
549
                                        <field name="ssl_check" invisible="True" />
 
550
                                        <field name="dg_check" />
 
551
                                        <field name="np_check" />
 
552
                        </field>
 
553
                
 
554
                </data>
 
555
                </field>
 
556
        </record>
 
557
        
 
558
        <record id="view_move_tree" model="ir.ui.view">
376
559
            <field name="name">stock.move.tree</field>
377
560
            <field name="model">stock.move</field>
378
561
            <field name="type">tree</field>
379
562
            <field eval="6" name="priority"/>
380
563
            <field name="inherit_id" ref="stock.view_move_tree" />
381
564
            <field name="arch" type="xml">
382
 
                <data>
383
 
 
384
 
            <xpath expr="//field[@name='product_uos']" position="replace">
385
 
            </xpath>
386
 
            <xpath expr="//field[@name='product_id']" position="attributes">
387
 
                <attribute name="context">{'location_id': location_id, 'prodlot_id': prodlot_id, 'compute_child': False}</attribute>
388
 
            </xpath>
389
 
 
390
 
                    <button name="action_done" position="after">
391
 
                        <field name="lot_check" />
392
 
                        <field name="exp_check" />
393
 
                        <field name="kc_check" />
394
 
                        <field name="ssl_check" invisible="True" />
395
 
                        <field name="dg_check" />
396
 
                        <field name="np_check" />
397
 
                    </button>
398
 
 
399
 
                    <button name="action_done" position="attributes">
400
 
                        <attribute name="invisible">1</attribute>
401
 
                    </button>
402
 
 
403
 
                </data>
404
 
            </field>
405
 
        </record>
406
 
 
407
 
        <record id="view_move_tree_reception_picking" model="ir.ui.view">
 
565
                <data>
 
566
 
 
567
                        <xpath expr="//field[@name='product_id']" position="attributes">
 
568
                                <attribute name="context">{'location_id': location_id, 'prodlot_id': prodlot_id, 'compute_child': False}</attribute>
 
569
                        </xpath>
 
570
                
 
571
                        <button name="action_done" position="after">
 
572
                                <field name="lot_check" />
 
573
                                <field name="exp_check" />
 
574
                                <field name="kc_check" />
 
575
                                        <field name="ssl_check" invisible="True" />
 
576
                                        <field name="dg_check" />
 
577
                                        <field name="np_check" />
 
578
                        </button>
 
579
                        
 
580
                        <button name="action_done" position="attributes">
 
581
                                <attribute name="invisible">1</attribute>
 
582
                        </button>
 
583
                
 
584
                </data>
 
585
                </field>
 
586
        </record>
 
587
        
 
588
        <record id="view_move_tree_reception_picking" model="ir.ui.view">
408
589
            <field name="name">stock.move.tree2</field>
409
590
            <field name="model">stock.move</field>
410
591
            <field name="type">tree</field>
411
592
            <field name="priority" eval="6" />
412
593
            <field name="inherit_id" ref="stock.view_move_tree_reception_picking" />
413
594
            <field name="arch" type="xml">
414
 
                <data>
415
 
 
416
 
            <xpath expr="//field[@name='product_id']" position="attributes">
417
 
                <attribute name="context">{'location_id': location_id, 'prodlot_id': prodlot_id, 'compute_child': False}</attribute>
418
 
            </xpath>
419
 
 
420
 
                    <button name="action_assign" position="after">
421
 
                        <field name="lot_check" />
422
 
                        <field name="exp_check" />
423
 
                        <field name="kc_check" />
424
 
                        <field name="ssl_check" invisible="True" />
425
 
                        <field name="dg_check" />
426
 
                        <field name="np_check" />
427
 
                    </button>
428
 
 
429
 
                    <button name="action_assign" position="attributes">
430
 
                        <attribute name="invisible">1</attribute>
431
 
                    </button>
432
 
 
433
 
                </data>
434
 
            </field>
435
 
        </record>
436
 
 
437
 
        <!-- Add product filters on Physical inventories to fill lines with list or nomenclature level -->
438
 
        <record id="stock_inventory_form" model="ir.ui.view">
439
 
            <field name="name">stock.inventory.form</field>
440
 
            <field name="model">stock.inventory</field>
441
 
            <field name="type">form</field>
442
 
            <field name="inherit_id" ref="stock.view_inventory_form" />
443
 
            <field name="arch" type="xml">
444
 
                <xpath expr="/form//field[@name='inventory_line_id']/tree//field[@name='product_id']" position="attributes">
445
 
                    <attribute name="domain">[('type', 'not in', ('consu', 'service', 'service_recep'))]</attribute>
446
 
                </xpath>
447
 
 
448
 
                <xpath expr="//tree/field[@name='product_uom']" position="attributes">
449
 
                    <attribute name="on_change">onchange_uom_qty(product_uom, product_qty)</attribute>
450
 
                </xpath>
451
 
 
452
 
                <xpath expr="//tree/field[@name='product_qty']" position="attributes">
453
 
                    <attribute name="on_change">onchange_uom_qty(product_uom, product_qty)</attribute>
454
 
                </xpath>
455
 
            </field>
456
 
        </record>
457
 
 
 
595
                <data>
 
596
 
 
597
                        <xpath expr="//field[@name='product_id']" position="attributes">
 
598
                                <attribute name="context">{'location_id': location_id, 'prodlot_id': prodlot_id, 'compute_child': False}</attribute>
 
599
                        </xpath>
 
600
                
 
601
                        <button name="%(stock.action_partial_move_server)d" position="after">
 
602
                                <field name="lot_check" />
 
603
                                <field name="exp_check" />
 
604
                                <field name="kc_check" />
 
605
                                        <field name="ssl_check" invisible="True" />
 
606
                                        <field name="dg_check" />
 
607
                                        <field name="np_check" />
 
608
                        </button>
 
609
                        
 
610
                        <button name="action_assign" position="attributes">
 
611
                                <attribute name="invisible">1</attribute>
 
612
                        </button>
 
613
                        
 
614
                        <button name="%(stock.action_partial_move_server)d" position="attributes">
 
615
                                <attribute name="invisible">1</attribute>
 
616
                        </button>
 
617
                
 
618
                </data>
 
619
                </field>
 
620
        </record>
 
621
        
458
622
        <record id="stock_inventory_line_tree" model="ir.ui.view">
459
623
            <field name="name">stock.inventory.line.tree</field>
460
624
            <field name="model">stock.inventory.line</field>
461
625
            <field name="type">tree</field>
462
626
            <field name="inherit_id" ref="stock.stock_inventory_line_tree" />
463
627
            <field name="arch" type="xml">
464
 
                <data>
465
 
                    <xpath expr="/tree/field[@name='product_uom']" position="after">
466
 
                        <field name="reason_type_id" widget="selection" domain="[('is_inventory', '=', True)]" />
467
 
                        <field name="comment" />
468
 
                    </xpath>
469
 
 
470
 
                    <xpath expr="/tree//field[@name='product_id']" position="attributes">
471
 
                        <attribute name="domain">[('type', 'not in', ('consu', 'service', 'service_recep'))]</attribute>
472
 
                        <attribute name="context">{'available_for_restriction': {'location_id': location_id}, 'search_default_not_restricted': 1}</attribute>
473
 
                    </xpath>
474
 
 
475
 
                    <field name="prod_lot_id" position="replace">
476
 
                        <field name="prod_lot_id"
477
 
                            on_change="change_lot(prod_lot_id)"
478
 
                            context="{'location_id':location_id, 'product_id': product_id}"
479
 
                            domain="[('check_type','=', True), ('product_id', '=', product_id)]"
480
 
                            attrs="{'required': [('hidden_batch_management_mandatory', '=', True)], 'readonly': [('hidden_perishable_mandatory', '=', False), ('hidden_batch_management_mandatory', '=', False)]}" />
481
 
                           <field name="expiry_date"
482
 
                            on_change="change_expiry(expiry_date, product_id, type_check)"
483
 
                            attrs="{'required': [('hidden_perishable_mandatory', '=', True)], 'readonly': [('hidden_perishable_mandatory', '=', False)]}" />
484
 
 
485
 
                        <field name="hidden_perishable_mandatory" invisible="True" />
486
 
                        <field name="hidden_batch_management_mandatory" invisible="True" />
487
 
                        <field name="type_check" invisible="True" />
488
 
                        <field name="lot_check" />
489
 
                        <field name="exp_check" />
490
 
                        <field name="kc_check" />
491
 
                        <field name="ssl_check" invisible="True" />
492
 
                        <field name="dg_check" />
493
 
                        <field name="np_check" />
494
 
                    <field name="has_problem" invisible="True" />
495
 
                    </field>
496
 
                </data>
 
628
                <data>
 
629
                        <xpath expr="/tree/field[@name='product_uom']" position="after">
 
630
                            <field name="reason_type_id" widget="selection" domain="[('is_inventory', '=', True)]" />
 
631
                            <field name="comment" />
 
632
                        </xpath>
 
633
                            
 
634
                                <field name="prod_lot_id" position="replace">
 
635
                                        <field name="prod_lot_id"
 
636
                                on_change="change_lot(prod_lot_id)"
 
637
                                groups="base.group_extended"
 
638
                                context="{'location_id':location_id, 'product_id': product_id, 'hidden_perishable_mandatory': hidden_perishable_mandatory}"
 
639
                                domain="[('check_type','=', True), ('product_id', '=', product_id)]"
 
640
                                attrs="{'required': [('hidden_batch_management_mandatory', '=', True)], 'readonly': [('hidden_perishable_mandatory', '=', False), ('hidden_batch_management_mandatory', '=', False)]}" />
 
641
                               <field name="expiry_date"
 
642
                                on_change="change_expiry(expiry_date, product_id, type_check)"
 
643
                                attrs="{'required': [('hidden_perishable_mandatory', '=', True)], 'readonly': [('hidden_perishable_mandatory', '=', False)]}" />
 
644
                                        
 
645
                                        <field name="hidden_perishable_mandatory" invisible="True" />
 
646
                                        <field name="hidden_batch_management_mandatory" invisible="True" />
 
647
                                        <field name="type_check" invisible="True" />
 
648
                                        <field name="lot_check" />
 
649
                                <field name="exp_check" />
 
650
                                <field name="kc_check" />
 
651
                                        <field name="ssl_check" invisible="True" />
 
652
                                        <field name="dg_check" />
 
653
                                        <field name="np_check" />
 
654
                                </field>
 
655
                </data>
497
656
            </field>
498
657
        </record>
499
658
 
503
662
            <field name="type">form</field>
504
663
            <field name="inherit_id" ref="stock.view_inventory_line_form" />
505
664
            <field name="arch" type="xml">
 
665
                <data>
 
666
                
 
667
                        <field name="prod_lot_id" position="replace">
 
668
                                <field name="prod_lot_id"
 
669
                                        on_change="change_lot(prod_lot_id)"
 
670
                                        groups="base.group_extended"
 
671
                                        context="{'location_id':location_id, 'product_id': product_id, 'hidden_perishable_mandatory': hidden_perishable_mandatory}"
 
672
                                        domain="[('check_type','=', True), ('product_id', '=', product_id)]"
 
673
                                        attrs="{'required': [('hidden_batch_management_mandatory', '=', True)], 'readonly': [('hidden_perishable_mandatory', '=', False), ('hidden_batch_management_mandatory', '=', False)]}" />
 
674
                            <field name="expiry_date"
 
675
                                        on_change="change_expiry(expiry_date, product_id, type_check)"
 
676
                                        attrs="{'required': [('hidden_perishable_mandatory', '=', True)], 'readonly': [('hidden_perishable_mandatory', '=', False)]}" />
 
677
                                        
 
678
                                        <field name="hidden_perishable_mandatory" invisible="True" />
 
679
                                        <field name="hidden_batch_management_mandatory" invisible="True" />
 
680
                                        <field name="type_check" invisible="True" />
 
681
                                        <field name="lot_check" />
 
682
                                <field name="exp_check" />
 
683
                                <field name="kc_check" />
 
684
                                        <field name="ssl_check" invisible="True" />
 
685
                                        <field name="dg_check" />
 
686
                                        <field name="np_check" />
 
687
                                </field>
 
688
                
 
689
                </data>
 
690
            </field>
 
691
        </record>
 
692
        
 
693
        <record id="view_inventory_form" model="ir.ui.view">
 
694
            <field name="name">stock.inventory.form</field>
 
695
            <field name="model">stock.inventory</field>
 
696
            <field name="type">form</field>
 
697
            <field name="inherit_id" ref="stock.view_inventory_form" />
 
698
            <field name="arch" type="xml">
506
699
                <data>
507
 
 
508
 
                    <field name="prod_lot_id" position="replace">
 
700
                
 
701
                        <xpath expr="//tree[@string='Products']//field[@name='location_id']" position="replace">
 
702
                                <field colspan="4" domain="[('usage','=','internal')]" name="location_id"
 
703
                                        on_change="on_change_location_id(location_id,product_id,prod_lot_id,product_uom,parent.date)"
 
704
                                        context="{'product_id': product_id, 'prodlot_id': prod_lot_id, 'specific_rules_tree_view': True, 'compute_child': False}" />
 
705
                        </xpath>
 
706
                        
 
707
                        <xpath expr="//tree[@string='Products']//field[@name='product_id']" position="replace">
 
708
                                <field context="location=location_id,uom=product_uom,to_date=parent.date,compute_child=False" name="product_id" on_change="on_change_product_id_specific_rules(location_id,product_id,prod_lot_id,product_uom,parent.date)"  domain="[('type','not in',('service','service_recep'))]" />
 
709
                        </xpath>
 
710
                
 
711
                    <xpath expr="//tree[@string='Products']//field[@name='prod_lot_id']" position="replace">
509
712
                        <field name="prod_lot_id"
510
 
                                on_change="change_lot(prod_lot_id)"
511
 
                                context="{'location_id':location_id, 'product_id': product_id, 'hidden_perishable_mandatory': hidden_perishable_mandatory}"
512
 
                                domain="[('check_type','=', True), ('product_id', '=', product_id)]"
513
 
                                attrs="{'required': [('hidden_batch_management_mandatory', '=', True)], 'readonly': [('hidden_perishable_mandatory', '=', False), ('hidden_batch_management_mandatory', '=', False)]}" />
514
 
                        <field name="expiry_date"
515
 
                                on_change="change_expiry(expiry_date, product_id, type_check)"
516
 
                                attrs="{'required': [('hidden_perishable_mandatory', '=', True)], 'readonly': [('hidden_perishable_mandatory', '=', False)]}" />
517
 
 
518
 
                        <field name="hidden_perishable_mandatory" invisible="True" />
519
 
                        <field name="hidden_batch_management_mandatory" invisible="True" />
520
 
                        <field name="type_check" invisible="True" />
521
 
                        <field name="lot_check" />
522
 
                        <field name="exp_check" />
523
 
                        <field name="kc_check" />
524
 
                        <field name="ssl_check" invisible="True" />
525
 
                        <field name="dg_check" />
526
 
                        <field name="np_check" />
527
 
                    </field>
528
 
 
 
713
                                on_change="change_lot(location_id,product_id,prod_lot_id,product_uom,parent.date)"
 
714
                                groups="base.group_extended"
 
715
                                context="{'location_id':location_id, 'product_id': product_id, 'hidden_perishable_mandatory': hidden_perishable_mandatory, 'search_default_real': True}"
 
716
                                domain="[('check_type','=', True), ('product_id', '=?', product_id)]"
 
717
                                attrs="{'required': [('hidden_batch_management_mandatory', '=', True)], 'readonly': [('hidden_perishable_mandatory', '=', False), ('hidden_batch_management_mandatory', '=', False)]}" />
 
718
                        <field name="expiry_date"
 
719
                                on_change="change_expiry(expiry_date, product_id, type_check)"
 
720
                                attrs="{'required': [('hidden_perishable_mandatory', '=', True)], 'readonly': [('hidden_perishable_mandatory', '=', False)]}" />
 
721
                                
 
722
                                <field name="hidden_perishable_mandatory" invisible="True" />
 
723
                                <field name="hidden_batch_management_mandatory" invisible="True" />
 
724
                                <field name="type_check" invisible="True" />
 
725
                                <field name="lot_check" />
 
726
                                <field name="exp_check" />
 
727
                                <field name="kc_check" />
 
728
                                        <field name="ssl_check" invisible="True" />
 
729
                                        <field name="dg_check" />
 
730
                                        <field name="np_check" />
 
731
                    </xpath>
 
732
                    
 
733
                    <xpath expr="//form[@string='Products ']//field[@name='prod_lot_id']" position="replace">
 
734
                        <field name="prod_lot_id"
 
735
                                on_change="change_lot(location_id,product_id,prod_lot_id,product_uom,parent.date)"
 
736
                                groups="base.group_extended"
 
737
                                context="{'location_id':location_id, 'product_id': product_id, 'hidden_perishable_mandatory': hidden_perishable_mandatory}"
 
738
                                domain="[('check_type','=', True), ('product_id', '=', product_id)]"
 
739
                                attrs="{'required': [('hidden_batch_management_mandatory', '=', True)], 'readonly': [('hidden_perishable_mandatory', '=', False), ('hidden_batch_management_mandatory', '=', False)]}" />
 
740
                        <field name="expiry_date"
 
741
                                on_change="change_expiry(expiry_date, product_id, type_check)"
 
742
                                attrs="{'required': [('hidden_perishable_mandatory', '=', True)], 'readonly': [('hidden_perishable_mandatory', '=', False)]}" />
 
743
                                
 
744
                                <field name="hidden_perishable_mandatory" invisible="True" />
 
745
                                <field name="hidden_batch_management_mandatory" invisible="True" />
 
746
                                <field name="type_check" invisible="True" />
 
747
                                <field name="lot_check" />
 
748
                                <field name="exp_check" />
 
749
                                <field name="kc_check" />
 
750
                                        <field name="ssl_check" invisible="True" />
 
751
                                        <field name="dg_check" />
 
752
                                        <field name="np_check" />
 
753
                    
 
754
                    </xpath>
 
755
                    
529
756
                </data>
530
757
            </field>
531
758
        </record>
532
 
 
 
759
        
533
760
        <record id="view_stock_inventory_search" model="ir.ui.view">
534
 
            <field name="name">report.stock.inventory.search</field>
535
 
            <field name="model">report.stock.inventory</field>
536
 
            <field name="type">search</field>
537
 
            <field name="inherit_id" ref="stock.view_stock_inventory_search" />
538
 
            <field name="arch" type="xml">
539
 
                <data>
540
 
 
541
 
                    <field name="prodlot_id" position="after">
542
 
                        <field name="expired_date" />
543
 
                    </field>
544
 
 
545
 
                    <filter name="group_lot" position="replace">
546
 
                        <filter name="group_lot" string="Batch" icon="terp-accessories-archiver" context="{'group_by':'prodlot_id'}"/>
547
 
                    </filter>
548
 
 
549
 
                    <filter name="group_lot" position="before">
550
 
                        <filter name="group_expiry" string="Expiry Month" icon="terp-accessories-archiver" context="{'group_by':'expired_date'}"/>
551
 
                    </filter>
552
 
 
553
 
                </data>
554
 
            </field>
555
 
        </record>
556
 
 
557
 
        <record id="view_stock_inventory_tree" model="ir.ui.view">
558
 
            <field name="name">report.stock.inventory.tree</field>
559
 
            <field name="model">report.stock.inventory</field>
560
 
            <field name="type">tree</field>
561
 
            <field name="inherit_id" ref="stock.view_stock_inventory_tree" />
562
 
            <field name="arch" type="xml">
563
 
                <data>
564
 
                    <field name="prodlot_id" position="replace">
565
 
                        <field name="prodlot_id" string="Batch" invisible="1" />
566
 
                    </field>
567
 
 
568
 
                    <field name="prodlot_id" position="after">
569
 
                        <field name="expired_date" invisible="1" string="Expiry Month"/>
570
 
                    </field>
571
 
 
572
 
                </data>
573
 
            </field>
574
 
        </record>
 
761
                <field name="name">report.stock.inventory.search</field>
 
762
                <field name="model">report.stock.inventory</field>
 
763
                <field name="type">search</field>
 
764
                <field name="inherit_id" ref="stock.view_stock_inventory_search" />
 
765
                <field name="arch" type="xml">
 
766
                        <data>
 
767
                        
 
768
                                <field name="prodlot_id" position="after">
 
769
                                <field name="expired_date" />
 
770
                                </field>
 
771
                        
 
772
                                <filter name="group_lot" position="replace">
 
773
                                        <filter name="group_lot" string="Batch" icon="terp-accessories-archiver" context="{'group_by':'prodlot_id'}"/>
 
774
                                </filter>
 
775
                                
 
776
                                <filter name="group_lot" position="before">
 
777
                                        <filter name="group_expiry" string="Expiry Month" icon="terp-accessories-archiver" context="{'group_by':'expired_date'}"/>
 
778
                                </filter>
 
779
                        
 
780
                        </data>
 
781
                </field>
 
782
            </record>
 
783
            
 
784
            <record id="view_stock_inventory_tree" model="ir.ui.view">
 
785
                <field name="name">report.stock.inventory.tree</field>
 
786
                <field name="model">report.stock.inventory</field>
 
787
                <field name="type">tree</field>
 
788
                <field name="inherit_id" ref="stock.view_stock_inventory_tree" />
 
789
                <field name="arch" type="xml">
 
790
                        <data>
 
791
                                <field name="prodlot_id" position="replace">
 
792
                                        <field name="prodlot_id" string="Batch" invisible="1" />
 
793
                                </field>
 
794
 
 
795
                                <field name="prodlot_id" position="after">
 
796
                                        <field name="expired_date" invisible="1" string="Expiry Month"/>
 
797
                                </field>
 
798
                                
 
799
                        </data>
 
800
                </field>
 
801
        </record>
575
802
 
576
803
        <record id="batch_view_production_lot_revision_form" model="ir.ui.view">
577
804
            <field name="name">batch.view.production.lot.revision.form</field>
597
824
            </field>
598
825
        </record>
599
826
 
600
 
        <delete id="stock.action_tracking_form" model="ir.actions.act_window" />
601
 
 
602
 
        <!-- Add on_change method on UoM field of Min/Max rule -->
603
 
        <record id="add_onchange_uom_stock_warehouse_orderpoint_view" model="ir.ui.view">
604
 
            <field name="name">add.onchange.uom.stock.warehouse.orderpoint.view</field>
605
 
            <field name="model">stock.warehouse.orderpoint</field>
606
 
            <field name="type">form</field>
607
 
            <field name="inherit_id" ref="procurement.view_warehouse_orderpoint_form" />
608
 
            <field name="arch" type="xml">
609
 
                <data>
610
 
 
611
 
                    <xpath expr="//field[@name='product_id']" position="attributes">
612
 
                        <attribute name="invisible">1</attribute>
613
 
                    </xpath>
614
 
 
615
 
                    <xpath expr="/form//field[@name='product_uom']" position="attributes">
616
 
                        <attribute name="invisible">1</attribute>
617
 
                    </xpath>
618
 
 
619
 
                    <xpath expr="//group[5]" position="replace">
620
 
                        <!-- Procurement Orders to Process replaced by stock.warehouse.orderpoint lines -->
621
 
                        <group colspan="4" col="4">
622
 
                        <separator colspan="4" string="Order min/max quantity by product" />
623
 
                        <field name="line_ids" nolabel="1" colspan="4"
624
 
                            context="{'product_min_qty': product_min_qty, 'product_max_qty': product_max_qty, 'qty_multiple': qty_multiple}">
625
 
                            <tree string="Products" editable="top"
626
 
                                colors="red: product_qty &lt;= 0.00">
627
 
                                <field name="product_id" on_change="onchange_product_id(product_id, product_uom_id, product_min_qty, product_max_qty)" />
628
 
                                <field name="product_uom_id" domain="[('uom_by_product', '=', product_id)]"
629
 
                                    on_change="onchange_uom_qty(product_uom_id, product_min_qty, product_max_qty)"/>
630
 
                                <field name="product_min_qty"
631
 
                                    on_change="onchange_uom_qty(product_uom_id, product_min_qty, product_max_qty)" />
632
 
                                <field name="product_max_qty"
633
 
                                    on_change="onchange_uom_qty(product_uom_id, product_min_qty, product_max_qty)" />
634
 
                                <field name="qty_multiple" />
635
 
                            </tree>
636
 
                        </field>
637
 
                        </group>
638
 
                    </xpath>
639
 
 
640
 
                </data>
641
 
            </field>
642
 
        </record>
643
 
 
644
 
</data>
 
827
        </data>
645
828
</openerp>