Merge remote-tracking branch 'odoo/master' into master-inline-searchview-ged
[odoo/odoo.git] / addons / stock / stock_view.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3     <data>
4
5         <!-- Top menu item -->
6         <menuitem name="Warehouse"
7             id="menu_stock_root"
8             groups="group_stock_manager,group_stock_user"
9             sequence="70"/>
10
11         <menuitem id="menu_stock_warehouse_mgmt" name="Operations" parent="menu_stock_root" sequence="1"/>
12         <menuitem id="menu_stock_product" name="Products" parent="menu_stock_root" sequence="6"/>
13         <menuitem name="Products by Category" id="menu_product_by_category_stock_form" action="product.product_category_action"
14             parent="stock.menu_stock_product" sequence="0" groups="base.group_no_one"/>
15         <menuitem action="product.product_normal_action" id="menu_stock_products_menu" parent="menu_stock_product" sequence="1"/>
16         <menuitem id="menu_stock_configuration" name="Configuration" parent="menu_stock_root" sequence="15" groups="group_stock_manager"/>
17         <menuitem id="menu_warehouse_config" name="Warehouse Management" parent="menu_stock_configuration" sequence="40" groups="base.group_no_one"/>
18         <menuitem id="menu_stock_inventory_control" name="Inventory Control" parent="menu_stock_root" sequence="2"/>
19         <menuitem
20             id="menu_product_in_config_stock" name="Products"
21             parent="stock.menu_stock_configuration" sequence="45" groups="base.group_no_one"/>
22         <menuitem
23             action="product.product_category_action_form" id="menu_product_category_config_stock"
24             parent="stock.menu_product_in_config_stock" sequence="0"/>
25         <menuitem
26             action="product.product_normal_action" id="menu_product_variant_config_stock"
27             parent="stock.menu_product_in_config_stock" sequence="2"/>
28         <menuitem
29             action="product.product_template_action" id="menu_product_template_config_stock"
30             parent="stock.menu_product_in_config_stock" sequence="1"/>
31         <menuitem
32             action="product.product_ul_form_action" groups="product.group_stock_packaging"
33             id="menu_product_packaging_stock_action" parent="stock.menu_product_in_config_stock" sequence="3"/>
34         <menuitem
35             id="menu_stock_unit_measure_stock" name="Units of Measure"
36             parent="stock.menu_product_in_config_stock"  sequence="35" groups="product.group_uom"/>
37         <menuitem
38             action="product.product_uom_categ_form_action" id="menu_stock_uom_categ_form_action"
39             parent="menu_stock_configuration" sequence="30" groups="product.group_uom"/>
40         <menuitem
41             action="product.product_uom_form_action" id="menu_stock_uom_form_action"
42             parent="menu_stock_configuration" sequence="35" groups="product.group_uom"/>
43
44         <record id="stock_inventory_line_tree" model="ir.ui.view">
45             <field name="name">stock.inventory.line.tree</field>
46             <field name="model">stock.inventory.line</field>
47             <field name="arch" type="xml">
48                 <tree string="Stock Inventory Lines">
49                     <field name="product_id"/>
50                     <field name="product_qty"/>
51                     <field name="product_uom_id" groups="product.group_uom"/>
52                     <field name="location_id" groups="stock.group_locations"/>
53                 </tree>
54             </field>
55         </record>
56
57          <record id="view_inventory_filter" model="ir.ui.view">
58             <field name="name">stock.inventory.filter</field>
59             <field name="model">stock.inventory</field>
60             <field name="arch" type="xml">
61                 <search string="Search Inventory">
62                     <field name="name" string="Inventory Reference"/>
63                     <field name="date"/>
64                     <field name="company_id" groups="base.group_multi_company"/>
65                     <group expand="0" string="Group By">
66                         <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
67                         <filter string="Inventories Month" icon="terp-go-month" domain="[]" context="{'group_by':'date'}" help="Physical Inventories by Month"/>
68                     </group>
69                 </search>
70
71             </field>
72         </record>
73
74         <record id="view_inventory_tree" model="ir.ui.view">
75             <field name="name">stock.inventory.tree</field>
76             <field name="model">stock.inventory</field>
77             <field name="arch" type="xml">
78                 <tree string="Lot Inventory" colors="grey:state == 'cancel'">
79                     <field name="name"/>
80                     <field name="date"/>
81                     <field name="state"/>
82                 </tree>
83             </field>
84         </record>
85
86         <record id="view_inventory_form" model="ir.ui.view">
87             <field name="name">stock.inventory.form</field>
88             <field name="model">stock.inventory</field>
89             <field name="arch" type="xml">
90                 <form string="Inventory Adjustment" version="7.0">
91                 <header>
92                     <button name="prepare_inventory" states="draft" string="Start Inventory" type="object" class="oe_highlight" groups="stock.group_stock_user"/>
93                     <button name="action_done" states="confirm" string="Validate Inventory" type="object" class="oe_highlight" groups="stock.group_stock_manager"/>
94                     <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object"/>
95                     <button name="action_cancel_inventory" states="confirm" string="Cancel Inventory" type="object"/>
96                     <field name="state" widget="statusbar" statusbar_visible="draft,confirm,done"/>
97                 </header>
98                 <sheet>
99                     <div class="oe_title">
100                         <label for="name" class="oe_edit_only"/>
101                         <h1><field name="name" placeholder="e.g. Annual inventory"/></h1>
102                     </div>
103                     <group>
104                         <group>
105                             <field name="location_id"/>
106                             <field name="filter" string="Inventory of" widget='radio' attrs="{'readonly': [('state', '!=', 'draft')]}"/>
107                         </group>
108                         <group>
109                             <field name="date"/>
110                             <field name="company_id" groups="base.group_multi_company" widget="selection"/>
111                             <field name="product_id" domain="[('type','=','product')]" attrs="{'invisible': [('filter', 'not in', ('product', 'product_owner'))]}"/>
112                             <field name="lot_id" attrs="{'invisible': [('filter', '!=', 'lot')]}" groups="stock.group_production_lot" />
113                             <field name="partner_id" attrs="{'invisible': [('filter', 'not in', ('owner', 'product_owner'))]}" groups="stock.group_tracking_owner"/>
114                             <field name="package_id" attrs="{'invisible': [('filter', '!=', 'pack')]}" groups="stock.group_tracking_lot"/>
115                         </group>
116                     </group>
117                     <notebook attrs="{'invisible':[('state','=','draft')]}">
118                         <page string="Inventory Details" >
119                             <button name="reset_real_qty" states="confirm" string="⇒ Set quantities to 0" type="object" class="oe_link oe_right" groups="stock.group_stock_user"/>
120                             <field name="line_ids" string="Inventory Details" context="{'default_location_id': location_id,  'default_product_id': product_id, 'default_prod_lot_id': lot_id, 'default_package_id': package_id, 'default_partner_id': partner_id}">
121                                 <tree string="Inventory Details" editable="bottom" colors="blue: product_qty != theoretical_qty; red: theoretical_qty &lt; 0">
122                                     <field context="{'location':location_id, 'uom':product_uom_id, 'to_date':parent.date}" name="product_id" on_change="on_change_product_id(product_id,product_uom_id,theoretical_qty,context)" domain="[('type','=','product')]"/>
123                                     <field name="product_uom_id" groups="product.group_uom" on_change="restrict_change(theoretical_qty)"/>
124                                     <field domain="[('usage','=','internal')]" name="location_id" groups="stock.group_locations" on_change="restrict_change(theoretical_qty)"/>
125                                     <field name="prod_lot_id" on_change="restrict_change(theoretical_qty)" domain="[('product_id', '=', product_id)]" context="{'default_product_id': product_id}"  groups="stock.group_production_lot"/>
126                                     <field name="package_id" on_change="restrict_change(theoretical_qty)" groups="stock.group_tracking_lot"/>
127                                     <field name="partner_id" on_change="restrict_change(theoretical_qty)" groups="stock.group_tracking_owner"/>
128                                     <field name="theoretical_qty" readonly="1"/>
129                                     <field name="product_qty" string="Real Quantity"/>
130                                     <field name="state" invisible="True"/>
131                                 </tree>
132                             </field>
133                             <p></p>
134                             <h3 class="oe_grey">Notes</h3>
135                             <ul class="oe_grey"><li>Inventory adjustments will be made by comparing the theoretical and the checked quantities.</li>
136                             <li>You can delete lines to ignore some products.</li>
137                             <li>If a product is not at the right place, set the checked quantity to 0 and create a new line with correct location.</li>
138                             </ul>
139                         </page>
140                         <page string="Inventory Adjustments" attrs="{'invisible': [('state', '!=', 'done')]}">
141                             <field name="move_ids">
142                                 <tree colors="grey:scrapped == True" string="Stock Moves">
143                                     <field name="product_id"/>
144                                     <field name="product_uom_qty" on_change="onchange_quantity(product_id, product_uom_qty, product_uom, product_uos)"/>
145                                     <field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
146                                     <field name="product_uos" groups="product.group_uos"/>
147                                     <field name="picking_id" invisible="1" />
148                                     <field name="create_date" invisible="1" />
149                                     <field name="date_expected" invisible="1" />
150                                     <button name="%(stock.move_scrap)d"
151                                        string="Scrap Products" type="action"
152                                        icon="terp-gtk-jump-to-ltr" context="{'scrap': True}"
153                                        states="draft,waiting,confirmed,assigned"
154                                        groups="base.group_user"/>
155                                     <field name="scrapped" invisible="1"/>
156                                     <field name="location_id"/>
157                                     <field name="location_dest_id"/>
158                                     <field name="state"/>
159                                 </tree>
160                             </field>
161                         </page>
162                     </notebook>
163                 </sheet>
164                 </form>
165             </field>
166         </record>
167
168         <record id="action_inventory_form" model="ir.actions.act_window">
169             <field name="name">Inventory Adjustments</field>
170             <field name="type">ir.actions.act_window</field>
171             <field name="res_model">stock.inventory</field>
172             <field name="view_type">form</field>
173             <field name="view_id" ref="view_inventory_tree"/>
174             <field name="search_view_id" ref="view_inventory_filter"/>
175             <field name="help" type="html">
176               <p class="oe_view_nocontent_create">
177                 Click to start an inventory. 
178               </p><p>
179                 Periodical Inventories are used to count the number of products
180                 available per location. You can use it once a year when you do
181                 the general inventory or whenever you need it, to adapt the
182                 current inventory level of a product.
183               </p>
184             </field>
185         </record>
186         <menuitem action="action_inventory_form" id="menu_action_inventory_form" parent="menu_stock_inventory_control" sequence="30"/>
187
188
189         <menuitem id="menu_traceability" name="Traceability" parent="menu_stock_root" 
190             sequence="3"/>
191
192         <record id="view_production_lot_form" model="ir.ui.view">
193             <field name="name">stock.production.lot.form</field>
194             <field name="model">stock.production.lot</field>
195             <field name="arch" type="xml">
196                 <form string="Serial Number" version="7.0">
197                     <div class="oe_button_box oe_right">
198                         <button name="action_traceability" icon="fa-arrow-up" class="oe_stat_button" string="Traceability" type="object" attrs="{'invisible': [('quant_ids','=',[])]}"/>
199                     </div>
200                     <div class="oe_title">
201                         <label for="name" class="oe_edit_only"/>
202                         <h1>
203                             <field name="name"/>
204                         </h1>
205                     </div>
206                     <group name="main_group">
207                         <group>
208                             <field name="product_id"/>
209                             <field name="ref"/>
210                         </group>
211                     </group>
212                     <notebook>
213                         <page string="Products">
214                             <field name="quant_ids">
215                                 <tree string="Stock Moves">
216                                     <field name="name"/>
217                                     <field name="product_id"/>
218                                     <field name="qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
219                                     <field name="location_id" groups="stock.group_locations"/>
220                                 </tree>
221                              </field>
222                         </page>
223                     </notebook>
224                 </form>
225             </field>
226         </record>
227         <record id="view_production_lot_tree" model="ir.ui.view">
228             <field name="name">stock.production.lot.tree</field>
229             <field name="model">stock.production.lot</field>
230             <field name="arch" type="xml">
231                 <tree string="Serial Number">
232                     <field name="name"/>
233                     <field name="ref"/>
234                     <field name="product_id"/>
235                     <field name="create_date"/>
236                 </tree>
237             </field>
238         </record>
239
240         <record model="ir.ui.view" id="search_product_lot_filter">
241             <field name="name">Production Lots Filter</field>
242             <field name="model">stock.production.lot</field>
243             <field name="arch" type="xml">
244                 <search string="Product Lots Filter">
245                     <field name="name" string="Product Lots" filter_domain="['|',('name','ilike',self),('ref','ilike',self)]"/>
246                     <field name="product_id"/>
247                     <group expand="0" string="Group By">
248                         <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
249                     </group>
250                 </search>
251             </field>
252         </record>
253
254         <record id="action_production_lot_form" model="ir.actions.act_window">
255             <field name="name">Serial Numbers</field>
256             <field name="type">ir.actions.act_window</field>
257             <field name="res_model">stock.production.lot</field>
258             <field name="view_type">form</field>
259             <field name="view_id" ref="view_production_lot_tree"/>
260             <field name="search_view_id" ref="search_product_lot_filter"/>
261             <field name="context">{}</field>
262             <field name="help" type="html">
263               <p class="oe_view_nocontent_create">
264                 Click to add a serial number.
265               </p><p>
266                 This is the list of all the production lots you recorded. When
267                 you select a lot, you can get the 
268                 traceability of the products contained in lot. By default, the
269                 list is filtered on the serial numbers that are available in
270                 your warehouse but you can uncheck the 'Available' button to
271                 get all the lots you produced, received or delivered to
272                 customers.
273               </p>
274             </field>
275         </record>
276         <menuitem action="action_production_lot_form" id="menu_action_production_lot_form"
277             parent="menu_traceability" groups="stock.group_production_lot"
278             sequence="1"/>
279
280         #
281         # Lot composition (history)
282         #
283         <record id="stock_move_tree" model="ir.ui.view">
284             <field name="name">Stock Moves</field>
285             <field name="model">stock.move</field>
286             <field name="arch" type="xml">
287                 <tree colors="grey:state == 'cancel'" string="Moves" create="false">
288                     <field name="product_id"/>
289                     <field name="product_uom_qty"/>
290                     <field name="product_uom"  string="Unit of Measure" groups="product.group_uom"/>
291                     <field name="product_packaging" domain="[('product_id','=',product_id)]" groups="product.group_stock_packaging"/>
292                     <field name="picking_id"/>
293                     <field name="location_id" groups="stock.group_locations"/>
294                     <field name="location_dest_id" groups="stock.group_locations"/>
295                     <field name="create_date" groups="base.group_no_one"/>
296                     <field name="date" string="Date" groups="base.group_no_one"/>
297                     <field name="date_expected" string="Date Expected"/>
298                     <field name="state"/>
299                 </tree>
300             </field>
301         </record>
302
303         <record id="stock_move_tree2" model="ir.ui.view">
304             <field name="name">Stock Moves</field>
305             <field name="model">stock.move</field>
306             <field name="arch" type="xml">
307                 <tree colors="grey:state == 'cancel'" string="Moves" create="false">
308                     <field name="product_id"/>
309                     <field name="product_uom_qty"/>
310                     <field name="product_uom"  string="Unit of Measure" groups="product.group_uom"/>
311                     <field name="product_packaging" domain="[('product_id','=',product_id)]" groups="product.group_stock_packaging"/>
312                     <field name="picking_id"/>
313                     <field name="location_id" groups="stock.group_locations"/>
314                     <field name="location_dest_id" groups="stock.group_locations"/>
315                     <field name="create_date" groups="base.group_no_one"/>
316                     <field name="date" string="Date" groups="base.group_no_one"/>
317                     <field name="date_expected" string="Date Expected"/>
318                     <field name="state"/>
319                 </tree>
320             </field>
321         </record>
322
323         <record id="action3" model="ir.actions.act_window">
324             <field name="name">Downstream traceability</field>
325             <field name="type">ir.actions.act_window</field>
326             <field name="res_model">stock.move</field>
327             <field name="domain">[('id','in',active_ids)]</field>
328             <field name="view_type">tree</field>
329             <field eval="stock_move_tree2" name="view_id"/>
330         </record>
331
332         <record id="ir_move_traceability_upstream" model="ir.values">
333             <field name="key2">tree_but_action</field>
334             <field name="model">stock.move</field>
335             <field name="name">Downstream traceability</field>
336             <field eval="'ir.actions.act_window,'+str(action3)" name="value"/>
337         </record>
338
339         <record id="action5" model="ir.actions.act_window">
340             <field name="name">Upstream traceability</field>
341             <field name="type">ir.actions.act_window</field>
342             <field name="res_model">stock.move</field>
343             <field name="domain">[('id','in',active_ids)]</field>
344             <field name="view_type">tree</field>
345             <field eval="stock_move_tree" name="view_id"/>
346         </record>
347
348         <record id="ir_move_traceability_downstream" model="ir.values">
349             <field name="key2">tree_but_action</field>
350             <field name="model">stock.move</field>
351             <field name="name">Upstream traceability</field>
352             <field eval="'ir.actions.act_window,'+str(action5)" name="value"/>
353         </record>
354
355         <record model="ir.actions.act_window" id="location_open_quants">
356             <field name="context">{'search_default_productgroup': 1}</field>
357             <field name="domain">[('location_id', 'child_of', active_ids)]</field>
358             <field name="name">Quants</field>
359             <field name="res_model">stock.quant</field>
360         </record>
361
362         <record id="view_location_form" model="ir.ui.view">
363             <field name="name">stock.location.form</field>
364             <field name="model">stock.location</field>
365             <field name="arch" type="xml">
366                 <form string="Stock Location" version="7.0">
367                     <div class="oe_right oe_button_box" name="buttons">
368                         <button string="Current Stock" name="%(location_open_quants)d" type="action"/>
369                     </div>
370                     <label for="name" class="oe_edit_only"/>
371                     <h1><field name="name"/></h1>
372                     <label for="location_id" class="oe_edit_only"/>
373                     <h2><field name="location_id"/></h2>
374
375                     <group>
376                         <group string="Additional Information">
377                             <field name="usage"/>
378                             <field name="partner_id"/>
379                             <field name="company_id" groups="base.group_multi_company" widget="selection"/>
380                             <field name="scrap_location"/>
381                             <field name="active"/>
382                         </group>
383                         <group string="Localization" name="localization">
384                             <field name="posx"/>
385                             <field name="posy"/>
386                             <field name="posz"/>
387                             <field name="loc_barcode"/>
388                         </group>
389                         <group string="Logistics" groups="stock.group_adv_location">
390                             <field name="removal_strategy_id" options="{'no_create': True}"/>
391                             <field name="putaway_strategy_id"/>
392                         </group>
393                     </group>
394                     <separator string="Additional Information"/>
395                     <field name="comment"/>
396                 </form>
397             </field>
398         </record>
399
400         <record id="view_location_search" model="ir.ui.view">
401             <field name="name">stock.location.search</field>
402             <field name="model">stock.location</field>
403             <field name="arch" type="xml">
404                 <search string="Stock Locations">
405                     <field name="name" string="Stock Locations"/>
406                     <filter icon="terp-go-home" name="in_location" string="Internal" domain="[('usage', '=', 'internal')]" help="Internal Locations"/>
407                     <filter icon="terp-personal" name="customer" string="Customer" domain="[('usage', '=', 'customer')]" help="Customer Locations"/>
408                     <filter icon="terp-personal" name="supplier" string="Supplier" domain="[('usage', '=', 'supplier')]" help="Supplier Locations"/>
409                     <field name="location_id" string="Parent Location"/>
410                 </search>
411             </field>
412         </record>
413
414
415         <record id="view_location_tree2" model="ir.ui.view">
416             <field name="name">stock.location.tree</field>
417             <field name="model">stock.location</field>
418             <field name="priority" eval="2"/>
419             <field name="arch" type="xml">
420                 <tree string="Stock Location" colors="blue:usage=='view';darkred:usage=='internal'">
421                     <field name="complete_name"/>
422                     <field name="usage"/>
423                 </tree>
424             </field>
425         </record>
426         
427         <record id="view_putaway" model="ir.ui.view">
428             <field name="name">product.putaway.form</field>
429             <field name="model">product.putaway</field>
430             <field name="arch" type="xml">
431                 <form string="Putaway" version="7.0">
432                    <group colspan="4">
433                        <field name="name"/>
434                        <field name="method"/>
435                    </group>
436                    <div attrs="{'invisible': [('method', '!=', 'fixed')]}">
437                        <separator string="Fixed Locations Per Categories"/>
438                        <field name="fixed_location_ids" colspan="4" nolabel="1">
439                            <tree editable="top">
440                                <field name="sequence" widget='handle'/>
441                                <field name="category_id"/> 
442                                <field name="fixed_location_id"/> 
443                            </tree>
444                        </field>
445                    </div>
446                </form>
447             </field>
448         </record>
449
450         <record id="view_removal" model="ir.ui.view">
451             <field name="name">product.removal.form</field>
452             <field name="model">product.removal</field>
453             <field name="arch" type="xml">
454                 <form string="Removal">
455                    <field name="name"/>
456                    <field name="method"/>
457                </form>
458             </field>
459         </record>
460
461         <record id="stock_location_path_tree" model="ir.ui.view">
462             <field name="name">stock.location.path.tree</field>
463             <field name="model">stock.location.path</field>
464             <field name="arch" type="xml">
465                 <tree string="Location Paths">
466                     <field name="location_from_id" />
467                     <field name="location_dest_id" />
468                     <field name="name" />
469                 </tree>
470             </field>
471         </record>
472
473         <record id="stock_location_path_form" model="ir.ui.view">
474             <field name="name">stock.location.path.form</field>
475             <field name="model">stock.location.path</field>
476             <field name="arch" type="xml">
477                 <form string="Location Paths" version="7.0">
478                     <group col="4">
479                         <group>
480                             <field name="name"/>
481                             <field name="location_from_id"/>
482                             <field name="location_dest_id"/>
483                         </group>
484                         <group>
485                             <field name="company_id" groups="base.group_multi_company" />
486                             <field name="picking_type_id"/>
487                             <field name="auto"/>
488                             <label for="delay" string="Delay"/>
489                         <div>
490                             <field name="delay" class="oe_inline"/>days
491                         </div>
492                         </group>
493                     </group>
494                 </form>
495             </field>
496         </record>
497
498         <record id="product_category_form_view_inherit" model="ir.ui.view">
499             <field name="name">product.category.form</field>
500             <field name="model">product.category</field>
501             <field name="inherit_id" ref="product.product_category_form_view" />
502             <field name="arch" type="xml">
503                 <xpath expr="//group[@name='parent']" position="inside">
504                     <group string="Logistics" colspan="2">
505                         <field name="route_ids" widget="many2many_tags"/>
506                         <div class="oe_inline" colspan="2">
507                             <p attrs="{'invisible':[('parent_id','=',False)]}">
508                             The following routes will apply to the products in this category taking into account parent categories: 
509                             <field name="total_route_ids" nolabel="1" widget="many2many_tags"/>
510                             </p>
511                         </div>
512                         <field name="removal_strategy_id" options="{'no_create': True}"/>
513                     </group>
514                 </xpath>
515             </field>
516         </record>
517         
518
519         <record id="action_location_form" model="ir.actions.act_window">
520             <field name="name">Locations</field>
521             <field name="res_model">stock.location</field>
522             <field name="type">ir.actions.act_window</field>
523             <field name="view_type">form</field>
524             <field name="view_id" ref="view_location_tree2"/>
525             <field name="search_view_id" ref="view_location_search"/>
526             <field name="context">{'search_default_in_location':1}</field>
527             <field name="help" type="html">
528               <p class="oe_view_nocontent_create">
529                 Click to add a location.
530               </p><p>
531                 Define your locations to reflect your warehouse structure and
532                 organization. OpenERP is able to manage physical locations
533                 (warehouses, shelves, bin, etc), partner locations (customers,
534                 suppliers) and virtual locations which are the counterpart of
535                 the stock operations like the manufacturing orders
536                 consumptions, inventories, etc.
537               </p><p>  
538                 Every stock operation in OpenERP moves the products from one
539                 location to another one.  For instance, if you receive products
540                 from a supplier, OpenERP will move products from the Supplier
541                 location to the Stock location. Each report can be performed on
542                 physical, partner or virtual locations.
543               </p>
544             </field>
545         </record>
546         <menuitem action="action_location_form" id="menu_action_location_form" groups="stock.group_locations"
547             parent="menu_stock_configuration" sequence="5"/>
548
549
550         <record id="act_product_stock_move_open" model="ir.actions.act_window">
551             <field name="context">{'search_default_done': 1,'search_default_product_id': active_id, 'default_product_id': active_id}</field>
552             <field name="name">Moves</field>
553             <field name="res_model">stock.move</field>
554         </record>
555
556         <record id="view_warehouse" model="ir.ui.view">
557             <field name="name">stock.warehouse</field>
558             <field name="model">stock.warehouse</field>
559             <field name="arch" type="xml">
560                 <form string="Warehouse" version="7.0">
561                     <sheet>
562                         <div class="oe_right oe_button_box">                        
563                             <button name="view_all_routes_for_wh" string="View Warehouse Routes" type="object"/> 
564                         </div>
565                         <label for="name" class="oe_edit_only"/>
566                         <h1><field name="name"/></h1>
567                         <group>
568                             <group>
569                                 <field name="code"/>
570                                 <field name="lot_stock_id" groups="stock.group_locations" string="Inventory Location" invisible="1"/>
571                             </group>
572                             <group>
573                                 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
574                                 <field name="partner_id"/>
575                             </group>
576                             <notebook colspan="4" groups="stock.group_adv_location">
577                                 <page string="Warehouse Configuration" colspan="4">
578                                     <group colspan="4">
579                                         <field name="reception_steps" widget='radio'/>
580                                         <field name="delivery_steps" widget='radio'/>
581                                         <field name="default_resupply_wh_id" widget='selection' on_change="onchange_filter_default_resupply_wh_id(default_resupply_wh_id, resupply_wh_ids)"/>
582                                         <field name="resupply_wh_ids" domain="[('id', '!=', id)]" widget='many2many_checkboxes' on_change="onchange_filter_default_resupply_wh_id(default_resupply_wh_id, resupply_wh_ids)"/> 
583                                     </group>
584                                 </page>
585                                 <page string="Technical Information" groups='base.group_no_one'>
586                                     <group>
587                                         <group string="Locations">
588                                             <field name="wh_input_stock_loc_id" readonly="1"/>
589                                             <field name="wh_qc_stock_loc_id" readonly="1"/>
590                                             <field name="wh_pack_stock_loc_id" readonly="1"/>
591                                             <field name="wh_output_stock_loc_id" readonly="1"/>
592                                         </group>
593                                         <group string="Picking Types">
594                                             <field name="in_type_id" readonly="1"/>
595                                             <field name="int_type_id" readonly="1"/>
596                                             <field name="pick_type_id" readonly="1"/>
597                                             <field name="pack_type_id" readonly="1"/>
598                                             <field name="out_type_id" readonly="1"/>
599                                         </group>
600                                     </group>
601                                 </page>
602                             </notebook>
603                         </group>
604                     </sheet>
605                 </form>
606             </field>
607         </record>
608         <record id="view_warehouse_tree" model="ir.ui.view">
609             <field name="name">stock.warehouse.tree</field>
610             <field name="model">stock.warehouse</field>
611             <field name="arch" type="xml">
612                 <tree string="Warehouse">
613                     <field name="name"/>
614                     <field name="lot_stock_id" groups="stock.group_locations"/>
615                     <field name="partner_id"/>
616                 </tree>
617             </field>
618         </record>
619         <record id="action_warehouse_form" model="ir.actions.act_window">
620             <field name="name">Warehouses</field>
621             <field name="res_model">stock.warehouse</field>
622             <field name="type">ir.actions.act_window</field>
623             <field name="view_type">form</field>
624             <field name="view_id" ref="view_warehouse_tree"/>
625             <field name="help" type="html">
626               <p class="oe_view_nocontent_create">
627                 Click to define a new warehouse.
628               </p>
629             </field>
630         </record>
631         <menuitem action="action_warehouse_form" id="menu_action_warehouse_form" groups="stock.group_locations"
632             parent="menu_stock_configuration" sequence="1"/>
633
634         <!--
635             Stock picking
636             Defaults and Internal Pickings
637         -->
638
639         <record model="ir.ui.view" id="stock_picking_calendar">
640             <field name="name">stock.picking.calendar</field>
641             <field name="model">stock.picking</field>
642             <field name="priority" eval="2"/>
643             <field name="arch" type="xml">
644                 <calendar string="Calendar View" date_start="min_date" date_stop="max_date" color="partner_id">
645                     <field name="origin"/>
646                     <field name="picking_type_id"/>
647                     <field name="partner_id"/>
648                 </calendar>
649             </field>
650         </record>
651
652         <record id="vpicktree" model="ir.ui.view">
653             <field name="name">stock.picking.tree</field>
654             <field name="model">stock.picking</field>
655             <field name="arch" type="xml">
656                 <tree colors="blue:state == 'draft';grey:state == 'cancel';red:state not in ('cancel', 'done') and date &lt; current_date" string="Picking list">
657                     <field name="name"/>
658                     <field name="location_dest_id"/>
659                     <field name="date"/>
660                     <field name="min_date" invisible="1"/>
661                     <field name="origin"/>
662                     <field name="group_id" invisible="1"/>
663                     <field name="backorder_id"/>
664                     <field name="state"/>
665                     <field name="priority" invisible="1"/>
666                     <field name="picking_type_id" invisible="1"/>
667                 </tree>
668             </field>
669         </record>
670
671         <record id="view_picking_form" model="ir.ui.view">
672             <field name="name">stock.picking.form</field>
673             <field name="model">stock.picking</field>
674             <field eval="12" name="priority"/>
675             <field name="arch" type="xml">
676                 <form string="Transfer" version="7.0">
677                 <header>
678                     <button name="action_confirm" states="draft" string="Mark as Todo" type="object" class="oe_highlight" groups="base.group_user"/>
679                     <button name="action_assign" states="confirmed,partially_available" string="Check Availability" type="object" class="oe_highlight" groups="base.group_user"/>
680                     <button name="force_assign" states="confirmed,waiting,partially_available" string="Force Availability" type="object" groups="base.group_user"/>
681                     <button name="do_transfer" states="assigned" string="Transfer" groups="stock.group_stock_user" type="object" class="oe_highlight" attrs="{'invisible': ['|', ('pack_operation_exist', '=', True)]}"/>
682                     <button name="do_partial_open_barcode" string="Enter Transfer Details" groups="stock.group_stock_user" type="object" class="oe_highlight" attrs="{'invisible': ['|',('pack_operation_exist', '=', True),('state','not in',('assigned', 'partially_available'))]}"/>
683                     <button name="open_barcode_interface" string="Open Barcode interface" groups="stock.group_stock_user" type="object" class="oe_highlight" attrs="{'invisible': ['|',('pack_operation_exist', '=', False),('state','not in',('assigned', 'partially_available'))]}"/>
684                     <button name="do_print_picking" string="Print Picking List" groups="stock.group_stock_user" type="object" attrs="{'invisible': ['|', ('picking_type_code', '=', 'outgoing'), ('state', '!=', 'assigned')]}"/>
685                     <button name="%(act_stock_return_picking)d" string="Reverse Transfer" states="done" type="action" groups="base.group_user"/>
686                     <button name="action_cancel" states="assigned,confirmed,partially_available,draft" string="Cancel Transfer" groups="base.group_user" type="object"/>
687                     <button name="do_unreserve" string="Unreserve" groups="base.group_user" type="object" attrs="{'invisible': [('quant_reserved_exist', '=', False)]}"/>
688                     <field name="state" widget="statusbar" statusbar_visible="draft,confirmed,partially_available,assigned,done" statusbar_colors='{"shipping_except":"red","invoice_except":"red","waiting_date":"blue"}'/>
689                 </header>
690                 <sheet>
691                     <div class="oe_right oe_button_box">
692                     </div>
693                     <h1>
694                         <field name="name" class="oe_inline" attrs="{'invisible': [('name','=','/')]}" readonly="1"/>
695                     </h1>
696                     <group>
697                         <group>
698                             <field name="partner_id"/>                            
699                             <field name="backorder_id" readonly="1" attrs="{'invisible': [('backorder_id','=',False)]}"/>
700                         </group>
701                         <group>
702                             <field name="date"/>
703                             <field name="min_date"/>
704                             <field name="origin" placeholder="e.g. PO0032" class="oe_inline"/>
705                             <label for="owner_id" groups="stock.group_tracking_owner"/>
706                             <div groups="stock.group_tracking_owner">
707                                 <field name="owner_id"/>
708                                 <button name="action_assign_owner" string="Assign Owner" type="object" attrs="{'invisible': ['|',('pack_operation_exist', '=', False),('state', 'not in', ('draft','assigned','confirmed'))]}"
709                                     class="oe_link oe_edit_only"/>
710                             </div>
711                         </group>
712                     </group>
713                     <notebook>
714                         <page string="Products">
715                             <separator string="Stock Moves" attrs="{'invisible': [('pack_operation_exist', '=', False)]}"/>
716 <!-- 
717                             <field name="move_lines" context="{'address_in_id': partner_id, 'form_view_ref':'stock.view_move_picking_form', 'tree_view_ref':'stock.view_move_picking_tree', 'default_picking_type_id': picking_type_id,'default_picking_id': active_id}"/>
718                             <group>
719                                 <group col="3"> 
720                                     <separator string="Quantities Done" attrs="{'invisible': [('pack_operation_exist', '=', False)]}"/>
721                                 </group>
722                                 <group col="1">
723                                     <field name="pack_operation_exist" invisible="1"/>
724                                     <button name="action_pack" string="Create Package" type="object" attrs="{'invisible': ['|',('pack_operation_exist', '=', False),('state', 'not in', ('draft','assigned','partially_available','confirmed'))]}" class="oe_link oe_right oe_inline" groups="product.group_stock_packaging"/>
725                                     <button name="do_split" string="Create Draft Backorder" groups="base.group_no_one" type="object" attrs="{'invisible': ['|',('pack_operation_exist', '=', False),('state','not in',('assigned', 'partially_available'))]}" class="oe_link oe_right oe_inline"/>
726                                     <button name="recheck_availability" string="Recheck Availability" type="object" attrs="{'invisible': ['|',('pack_operation_exist', '=', False),('state','not in',('assigned', 'partially_available'))]}" groups="stock.group_stock_user" class="oe_link oe_right oe_inline"/>
727                                 </group>
728                             </group>
729                             <field name="pack_operation_ids" attrs="{'invisible': [('pack_operation_exist', '=', False)]}" context="{'default_owner_id': owner_id, 'default_location_id': location_id, 'default_location_dest_id': location_dest_id}">
730                                 <tree editable="top">   
731                                     <field name="location_id"/>
732                                     <field name="product_id" on_change='product_id_change(product_id, product_uom_id, product_qty, context)'/>
733                                     <field name="product_uom_id" groups="product.group_uom" on_change='on_change_tests(product_id, product_uom_id, product_qty, context)'/>
734                                     <field name="lot_id" domain="[('product_id','=?', product_id)]" context="{'product_id': product_id}" groups="stock.group_production_lot"/>
735                                     <field name="package_id" groups="stock.group_tracking_lot"/>
736                                     <field name="owner_id" groups="stock.group_tracking_owner"/>
737                                     <field name="product_qty" attrs="{'required': [('product_id', '!=', False)]}" on_change='on_change_tests(product_id, product_uom_id, product_qty, context)'/>
738                                     <field name="location_dest_id"/>
739                                     <field name="result_package_id" groups="stock.group_tracking_lot"/>
740                                 </tree>
741                             </field>
742 -->
743                             <field name="move_lines" context="{'address_in_id': partner_id, 'form_view_ref':'stock.view_move_picking_form', 'tree_view_ref':'view_move_picking_tree', 'default_picking_type_id': picking_type_id,'default_picking_id': active_id}"/>
744                             <field name="pack_operation_exist" invisible="1"/>
745                             <field name="note" placeholder="Add an internal note..." class="oe_inline"/>
746                         </page>
747                         <page string="Additional Info">
748                             <group string="General Informations">
749                                 <group>
750                                     <field name="move_type"/>
751                                     <field name="picking_type_id"/>
752                                     <field name="picking_type_code" invisible="1"/>
753                                     <field name="quant_reserved_exist" invisible="1"/>                                    
754                                     <field name="location_id" invisible="1"/>
755                                     <field name="location_dest_id" invisible="1"/>
756                                 </group>
757                                 <group>
758                                     <field name="company_id" groups="base.group_multi_company" widget="selection"/>
759                                     <field name="date_done" groups="base.group_no_one"/>
760                                     <field name="group_id"/>
761                                     <field name="priority"/>
762                                 </group>
763                             </group>
764                         </page>
765                     </notebook>
766                 </sheet>
767                 <div class="oe_chatter">
768                     <field name="message_follower_ids" widget="mail_followers"/>
769                     <field name="message_ids" widget="mail_thread"/>
770                 </div>
771                 </form>
772             </field>
773         </record>
774
775         <record id="view_picking_internal_search" model="ir.ui.view">
776             <field name="name">stock.picking.internal.search</field>
777             <field name="model">stock.picking</field>
778             <field name="arch" type="xml">
779                 <search string="Picking Lists">
780                     <field name="name" string="Picking List" filter_domain="['|',('name','ilike', self),('origin','ilike',self)]"/>
781                     <filter icon="terp-check" name="draft" string="Draft" domain="[('state','=','draft')]" help="Draft Moves"/>
782                     <filter icon="terp-check" name="available" string="Ready" domain="[('state','in',('assigned', 'partially_available'))]" help="Assigned Moves"/>
783                     <filter icon="terp-check" name="waiting" string="Waiting Availability" domain="[('state','=', 'confirmed')]" help="Waiting Moves"/>
784                     <filter icon="terp-camera_test" name="confirmed" string="Confirmed" domain="[('state','in', ('confirmed', 'waiting', 'assigned'))]" help="Confirmed Moves"/>
785                     <filter icon="terp-dialog-close" name="done" string="Done" domain="[('state','=','done')]" help="Pickings already processed"/>
786                     <separator/>
787                     <filter name="late" string="Late" domain="[('min_date','&lt;', time.strftime('%%Y-%%m-%%d'))]" help="Pickings that are late on scheduled time"/>
788                     <separator/>
789                     <filter name="backorder" string="Backorders" domain="[('backorder_id','&lt;&gt;', False)]" help="Remaining parts of picking partially processed"/>
790                     <field name="partner_id" filter_domain="[('partner_id','child_of',self)]"/>
791                     <field name="product_id"/>
792                     <field name="picking_type_id"/>
793                     <field name="group_id"/>
794                     <group expand="0" string="Group By">
795                         <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
796                         <filter string="Order Date" icon="terp-go-month" domain="[]"  context="{'group_by':'date'}"/>
797                         <filter string="Expected Date" icon="terp-go-month" domain="[]"  context="{'group_by':'min_date'}"/>
798                         <filter string="Origin" domain="[]" context="{'group_by':'origin'}"/>
799                         <filter string="Picking Type" domain="[]" context="{'group_by':'picking_type_id'}"/>
800                         <filter string="Procurement Group" domain="[]" context="{'group_by':'group_id'}"/>
801                     </group>
802                 </search>
803             </field>
804         </record>
805
806         <record id="action_picking_tree_all" model="ir.actions.act_window">
807             <field name="name">Stock Operations</field>
808             <field name="res_model">stock.picking</field>
809             <field name="type">ir.actions.act_window</field>
810             <field name="view_type">form</field>
811             <field name="view_mode">tree,form,calendar</field>
812             <field name="domain"></field>
813             <field name="context">{
814                     'contact_display': 'partner_address',
815             }
816             </field>
817             <field name="search_view_id" ref="view_picking_internal_search"/>
818         </record>
819
820         <record id="action_picking_tree_done" model="ir.actions.act_window">
821             <field name="name">Done Transfers</field>
822             <field name="res_model">stock.picking</field>
823             <field name="type">ir.actions.act_window</field>
824             <field name="view_type">form</field>
825             <field name="view_mode">tree,form,calendar</field>
826             <field name="domain"></field>
827             <field name="context">{
828                     'search_default_picking_type_id': [active_id],
829                     'default_picking_type_id': active_id,
830                     'contact_display': 'partner_address',
831                     'search_default_done': 1,
832             }
833             </field>
834             <field name="search_view_id" ref="view_picking_internal_search"/>
835         </record>
836
837         <record id="action_picking_tree_ready" model="ir.actions.act_window">
838             <field name="name">Ready Transfers</field>
839             <field name="res_model">stock.picking</field>
840             <field name="type">ir.actions.act_window</field>
841             <field name="view_type">form</field>
842             <field name="view_mode">tree,form,calendar</field>
843             <field name="domain"></field>
844             <field name="context">{
845                     'search_default_picking_type_id': [active_id],
846                     'default_picking_type_id': active_id,
847                     'contact_display': 'partner_address',
848                     'search_default_available': 1,
849             }
850             </field>
851             <field name="search_view_id" ref="view_picking_internal_search"/>
852         </record>
853
854         <record id="action_picking_tree_done_grouped" model="ir.actions.act_window">
855             <field name="name">Done Transfers by Date</field>
856             <field name="res_model">stock.picking</field>
857             <field name="type">ir.actions.act_window</field>
858             <field name="view_type">form</field>
859             <field name="view_mode">tree,form,calendar</field>
860             <field name="domain"></field>
861             <field name="context">{
862                     'search_default_picking_type_id': [active_id],
863                     'default_picking_type_id': active_id,
864                     'contact_display': 'partner_address',
865                     'search_default_done': 1,
866                     'group_by': ['date'],
867             }
868             </field>
869             <field name="search_view_id" ref="view_picking_internal_search"/>
870         </record>
871
872         <record id="action_picking_tree_waiting" model="ir.actions.act_window">
873             <field name="name">Waiting Availability Transfers</field>
874             <field name="res_model">stock.picking</field>
875             <field name="type">ir.actions.act_window</field>
876             <field name="view_type">form</field>
877             <field name="view_mode">tree,form,calendar</field>
878             <field name="domain"></field>
879             <field name="context">{
880                     'search_default_picking_type_id': [active_id],
881                     'default_picking_type_id': active_id,
882                     'contact_display': 'partner_address',
883                     'search_default_waiting': 1,
884             }
885             </field>
886             <field name="search_view_id" ref="view_picking_internal_search"/>
887         </record>
888
889         <record id="action_picking_tree_late" model="ir.actions.act_window">
890             <field name="name">Late Transfers</field>
891             <field name="res_model">stock.picking</field>
892             <field name="type">ir.actions.act_window</field>
893             <field name="view_type">form</field>
894             <field name="view_mode">tree,form,calendar</field>
895             <field name="domain"></field>
896             <field name="context">{
897                     'search_default_picking_type_id': [active_id],
898                     'default_picking_type_id': active_id,
899                     'contact_display': 'partner_address',
900                     'search_default_late': 1,
901                     'search_default_confirmed': 1,
902             }
903             </field>
904             <field name="search_view_id" ref="view_picking_internal_search"/>
905         </record>
906
907         <record id="action_picking_tree_backorder" model="ir.actions.act_window">
908             <field name="name">Backorders</field>
909             <field name="res_model">stock.picking</field>
910             <field name="type">ir.actions.act_window</field>
911             <field name="view_type">form</field>
912             <field name="view_mode">tree,form,calendar</field>
913             <field name="domain"></field>
914             <field name="context">{
915                     'search_default_picking_type_id': [active_id],
916                     'default_picking_type_id': active_id,
917                     'contact_display': 'partner_address',
918                     'search_default_backorder': 1,
919                     'search_default_confirmed': 1,
920             }
921             </field>
922             <field name="search_view_id" ref="view_picking_internal_search"/>
923         </record>
924
925         <record id="action_picking_tree" model="ir.actions.act_window">
926             <field name="name">Transfers</field>
927             <field name="res_model">stock.picking</field>
928             <field name="type">ir.actions.act_window</field>
929             <field name="view_type">form</field>
930             <field name="view_mode">tree,form,calendar</field>
931             <field name="domain"></field>
932             <field name="context">{
933                     'search_default_picking_type_id': [active_id],
934                     'default_picking_type_id': active_id,
935                     'contact_display': 'partner_address',
936             }
937             </field>
938             <field name="search_view_id" ref="view_picking_internal_search"/>
939             <field name="help" type="html">
940               <p class="oe_view_nocontent_create">
941                 Click to create a stock operation. 
942               </p><p>
943                 Most operations are prepared automatically by OpenERP according
944                 to your preconfigured logistics rules, but you can also record
945                 manual stock movements.
946               </p>
947             </field>
948         </record>
949
950         <record id="view_move_graph" model="ir.ui.view">
951             <field name="name">stock.move.graph</field>
952             <field name="model">stock.move</field>
953             <field name="arch" type="xml">
954                 <graph string="Stock Moves Analysis" type="pivot">
955                     <field name="product_id" type="row"/>
956                     <field name="location_dest_id" groups="stock.group_locations" type="row"/>
957                     <field name="product_uom_qty" type="measure"/>
958                 </graph>
959             </field>
960         </record>
961
962         <record id="view_move_tree" model="ir.ui.view">
963             <field name="name">stock.move.tree</field>
964             <field name="model">stock.move</field>
965             <field eval="8" name="priority"/>
966             <field name="arch" type="xml">
967                 <tree colors="grey:state == 'cancel';red:(state not in ('cancel','done')) and date > current_date" string="Moves">
968                     <field name="name"/>
969                     <field name="picking_id" string="Reference"/>
970                     <field name="origin"/>
971                     <field name="picking_type_id"/>
972                     <field name="create_date" invisible="1" groups="base.group_no_one"/>
973                     <field name="product_id" on_change="onchange_product_id(product_id,location_id,location_dest_id, False)"/>
974                     <field name="product_uom_qty" on_change="onchange_quantity(product_id, product_uom_qty, product_uom, product_uos)"/>
975                     <field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
976                     <field name="product_uos" groups="product.group_uos"/>
977                     <button name="%(stock.move_scrap)d"
978                         string="Scrap Products" type="action"
979                         icon="terp-gtk-jump-to-ltr" context="{'scrap': True}"
980                         states="draft,waiting,confirmed,assigned"/>
981                     <field name="location_id" groups="stock.group_locations"/>
982                     <field name="location_dest_id" groups="stock.group_locations"/>
983                     <field name="date" groups="base.group_no_one"/>
984                     <field name="date_expected"/>
985                     <field name="state"/>
986                     <button name="action_done" states="confirmed,assigned" string="Process" type="object" icon="gtk-go-forward" help="Done"/>
987                 </tree>
988             </field>
989         </record>
990
991         <record id="view_move_picking_tree" model="ir.ui.view">
992             <field name="name">stock.move.tree</field>
993             <field name="model">stock.move</field>
994             <field eval="4" name="priority"/>
995             <field name="arch" type="xml">
996                 <tree colors="grey:scrapped == True" string="Stock Moves">
997                     <field name="product_id"/>
998                     <field name="product_uom_qty" on_change="onchange_quantity(product_id, product_uom_qty, product_uom, product_uos)"/>
999                     <field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
1000                     <field name="product_uos" groups="product.group_uos"/>
1001                     <field name="location_id" groups="stock.group_locations" invisible="1"/>
1002                     <field name="picking_id" invisible="1" />
1003                     <field name="create_date" invisible="1" />
1004                     <field name="date_expected" invisible="1" />
1005                     <button name="%(stock.move_scrap)d"
1006                        string="Scrap Products" type="action"
1007                        icon="terp-gtk-jump-to-ltr" context="{'scrap': True}"
1008                        states="draft,waiting,confirmed,assigned"
1009                        groups="base.group_user"/>
1010                     <field name="scrapped" invisible="1"/>
1011                     <field name="availability" invisible="1"/>
1012                     <field name="reserved_availability" invisible="1"/>
1013                     <field name="location_dest_id" groups="stock.group_locations"/>
1014                     <field name="remaining_qty" invisible="1"/>
1015                     <field name="string_availability_info"/>
1016                     <field name="state"/>
1017                 </tree>
1018             </field>
1019         </record>
1020
1021         <record id="view_move_form" model="ir.ui.view">
1022             <field name="name">stock.move.form</field>
1023             <field name="model">stock.move</field>
1024             <field eval="1" name="priority"/>
1025             <field name="arch" type="xml">
1026                 <form string="Stock Moves" version="7.0">
1027                 <header>
1028                     <button name="action_confirm" states="draft" string="Process Later" type="object" class="oe_highlight"/>
1029                     <button name="action_done" states="draft,assigned,confirmed" string="Process Entirely" type="object" class="oe_highlight"/>
1030                     <button name="force_assign" states="confirmed" string="Set Available" type="object" class="oe_highlight"/>
1031                     <button name="action_cancel" states="draft,assigned,confirmed" string="Cancel Move" type="object"/>
1032                     <field name="state" widget="statusbar" statusbar_visible="draft,confirmed,assigned,done" statusbar_colors='{"waiting":"blue","confirmed":"blue"}'/>
1033                 </header>
1034                 <sheet>
1035                     <group>
1036                         <group name="main_grp" colspan="4">
1037                             <group name="main_grp_col1">
1038                                 <field name="product_id" on_change="onchange_product_id(product_id,location_id,location_dest_id, False)"/>
1039                                 <label for="product_uom_qty"/>
1040                                 <div>
1041                                     <field name="product_uom_qty"
1042                                         on_change="onchange_quantity(product_id, product_uom_qty, product_uom, product_uos)"
1043                                         class="oe_inline"/>
1044                                     <field name="product_uom" groups="product.group_uom" class="oe_inline"/>
1045                                     <button name="%(stock.move_scrap)d"
1046                                             string="Scrap" type="action"
1047                                             icon="terp-gtk-jump-to-ltr" context="{'scrap': True}"
1048                                             states="draft,waiting,confirmed,assigned" colspan="1"/>
1049                                 </div>
1050                                 <field name="name"/>
1051                                 <label for="product_uos_qty" groups="product.group_uos"/>
1052                                 <div groups="product.group_uos">
1053                                     <field name="product_uos_qty"
1054                                         on_change="onchange_uos_quantity(product_id, product_uos_qty, product_uos, product_uom)"
1055                                         class="oe_inline"/>
1056                                     <field name="product_uos" class="oe_inline"/>
1057                                 </div>
1058                             </group>
1059                             <group name="main_grp_col2">
1060                                 <field name="picking_type_id"/>
1061                                 <field name="picking_priority"/>
1062                                 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
1063                                 <field name="date_expected" on_change="onchange_date(date,date_expected)" attrs="{'invisible': [('state', '=', 'done')]}"/>
1064                                 <field name="date" attrs="{'invisible': [('state', '!=', 'done')]}"/>
1065                             </group>
1066                         </group>
1067                         <group name="origin_grp" string="Origin">
1068                             <field name="origin"/>
1069                             <field name="location_id" groups="stock.group_locations"/>
1070                             <field name="picking_id" domain="[('picking_type_id','=',picking_type_id)]"/>
1071                             <field name="create_date" groups="base.group_no_one"/>
1072                             <field name="procure_method" attrs="{'readonly': [('state', '!=', 'draft')]}" groups="stock.group_adv_location"/>
1073                             <field name="group_id"/>
1074                         </group>
1075                         <group name="destination_grp" string="Destination" groups="stock.group_locations">
1076                             <field name="location_dest_id" />
1077                             <field name="partner_id" context="{'contact_display':'partner'}" />
1078                         </group>
1079                         <group name="quants_grp" string="Reserved Quants" colspan="4" groups="base.group_no_one">
1080                             <field name="reserved_quant_ids"/>
1081                         </group>
1082                     </group>
1083                 </sheet>
1084                 </form>
1085             </field>
1086         </record>
1087
1088         <record id="view_move_picking_form" model="ir.ui.view">
1089             <field name="name">stock.move.form</field>
1090             <field name="model">stock.move</field>
1091             <field eval="20" name="priority"/>
1092             <field name="arch" type="xml">
1093                 <form string="Stock Moves" version="7.0">
1094                 <header>
1095                         <button name="force_assign" states="confirmed" string="Force Availability" type="object" groups="base.group_user"/>
1096                         <button name="action_confirm" states="draft" string="Confirm" type="object" groups="base.group_user"/>
1097                         <button name="do_unreserve" states="assigned" string="Cancel Availability" type="object" groups="base.group_user"/>
1098                         <field name="state" widget="statusbar" statusbar_visible="draft,assigned,done"/>
1099                 </header>
1100                 <group>
1101                     <group>
1102                         <field name="product_id" on_change="onchange_product_id(product_id,location_id,location_dest_id, parent.partner_id)"/>
1103                         <field name="procure_method" groups="stock.group_adv_location"/>
1104                         <field name="picking_type_id" invisible="1"/>
1105                         <label for="product_uom_qty"/>
1106                         <div>
1107                             <field name="product_uom_qty" on_change="onchange_quantity(product_id, product_uom_qty, product_uom, product_uos)" class="oe_inline"/>
1108                             <field name="product_uom" string="Unit Of Measure" groups="product.group_uom" class="oe_inline"/>
1109                             <button name="%(stock.move_scrap)d"
1110                                 string="Scrap" type="action"
1111                                 icon="terp-gtk-jump-to-ltr" context="{'scrap': True}"
1112                                 states="draft,waiting,confirmed,assigned"
1113                                 groups="base.group_user"/>
1114                         </div>
1115                         <label for="product_uos_qty" groups="product.group_uos"/>
1116                         <div groups="product.group_uos">
1117                             <field name="product_uos_qty" on_change="onchange_uos_quantity(product_id, product_uos_qty, product_uos, product_uom)" class="oe_inline"/>
1118                             <field name="product_uos" on_change="onchange_quantity(product_id, product_uom_qty, product_uom, product_uos)" class="oe_inline"/>
1119                         </div>
1120                         <field name="name"/>
1121                         <field name="product_packaging" groups="product.group_stock_packaging" domain="[('product_id','=',product_id)]"/>
1122                     </group>
1123                     <group>
1124                         <field name="create_date" invisible="1"/>
1125                         <field name="date"/>
1126                         <field name="date_expected" on_change="onchange_date(date,date_expected)"/>
1127                     </group>
1128                     <group string="Locations" groups="stock.group_locations">
1129                         <field name="location_id" domain="[('usage','&lt;&gt;','view')]"/>
1130                         <field name="location_dest_id" domain="[('usage','=','internal')]"/>
1131                     </group>
1132                     <group name="quants_grp" string="Reserved Quants" colspan="4" groups="base.group_no_one">
1133                         <field name="reserved_quant_ids"/>
1134                     </group>
1135                 </group>
1136                 </form>
1137             </field>
1138         </record>
1139
1140         <record id="view_move_search" model="ir.ui.view">
1141             <field name="name">stock.move.search</field>
1142             <field name="model">stock.move</field>
1143             <field eval="3" name="priority"/>
1144             <field name="arch" type="xml">
1145                 <search string="Stock Moves">
1146                     <field name="origin" filter_domain="['|', '|', ('origin', 'ilike', self), ('name', 'ilike', self), ('picking_id', 'ilike', self)]" string="Reference"/>
1147                     <field name="date" groups="base.group_no_one"/>
1148
1149                     <filter icon="terp-camera_test" string="Ready" name="ready" domain="[('state','=','assigned')]" help="Stock moves that are Available (Ready to process)"/>
1150                     <filter icon="terp-stock" string="To Do" name="future" domain="[('state','in',('assigned','confirmed','waiting'))]" help="Stock moves that are Confirmed, Available or Waiting"/>
1151                     <filter icon="terp-dialog-close" string="Done" name="done" domain="[('state','=','done')]" help="Stock moves that have been processed"/>
1152                     <separator/>
1153                     <filter icon="terp-go-today" string="Today" domain="[('date','&lt;=',time.strftime('%%Y-%%m-%%d 23:59:59')),('date','&gt;=',time.strftime('%%Y-%%m-%%d 00:00:00'))]" help="Orders processed Today or planned for Today"/>
1154                     <field name="product_id"/>
1155                     <field name="name" string="Location" filter_domain="['|',('location_id','ilike',self),('location_dest_id','ilike',self)]"/>
1156                     <field name="partner_id" string="Partner"  filter_domain="[('picking_id.partner_id','child_of',self)]"/>
1157                     <group expand="0" string="Group By">
1158                         <filter string="Product" name="by_product" icon="terp-accessories-archiver" domain="[]"  context="{'group_by':'product_id'}"/>
1159                         <filter string="Picking" name="groupby_picking_id" icon="terp-accessories-archiver" domain="[]"  context="{'group_by':'picking_id'}"/>
1160                         <filter string="Source" name="groupby_location_id" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'location_id'}" groups="stock.group_locations"/>
1161                         <filter string="Destination" name="groupby_dest_location_id" icon="terp-gtk-jump-to-ltr" domain="[]" context="{'group_by':'location_dest_id'}" groups="stock.group_locations"/>
1162                         <filter icon="terp-stock_effects-object-colorize" string="Status" domain="[]" context="{'group_by':'state'}"/>
1163                         <filter string="Creation" name="groupby_create_date" icon="terp-go-month" domain="[]" context="{'group_by':'create_date'}" groups="base.group_no_one"/>
1164                         <filter string="Scheduled" name="groupby_date" icon="terp-go-month" domain="[]" context="{'group_by':'date_expected'}"/>
1165                     </group>
1166                 </search>
1167             </field>
1168         </record>
1169
1170         <record id="action_move_form2" model="ir.actions.act_window">
1171             <field name="name">Stock Moves</field>
1172             <field name="res_model">stock.move</field>
1173             <field name="type">ir.actions.act_window</field>
1174             <field name="view_type">form</field>
1175             <field name="view_id" ref="view_move_tree"/>
1176             <field name="search_view_id" ref="view_move_search"/>
1177             <field name="context">{}</field>
1178             <field name="help" type="html">
1179               <p class="oe_view_nocontent_create">
1180                 Click to create a stock movement.
1181               </p><p>
1182                 This menu gives you the full traceability of inventory
1183                 operations on a specific product. You can filter on the product
1184                 to see all the past or future movements for the product.
1185               </p>
1186             </field>
1187         </record>
1188         
1189         <record model="ir.actions.act_window.view" id="action_stock_move_tree_all">
1190             <field name="sequence" eval="1"/>
1191             <field name="view_mode">tree</field>
1192             <field name="view_id" ref="view_move_tree"/>
1193             <field name="act_window_id" ref="action_move_form2"/>
1194         </record>
1195
1196         <record model="ir.actions.act_window.view" id="action_stock_move_form_all">
1197             <field name="sequence" eval="3"/>
1198             <field name="view_mode">form</field>
1199             <field name="view_id" ref="view_move_form"/>
1200         <field name="act_window_id" ref="action_move_form2"/>
1201         </record>
1202
1203         <record model="ir.actions.act_window.view" id="action_stock_move_graph_all">
1204             <field name="sequence" eval="3"/>
1205             <field name="view_mode">graph</field>
1206             <field name="view_id" ref="view_move_graph"/>
1207         <field name="act_window_id" ref="action_move_form2"/>
1208         </record>
1209
1210         <menuitem action="action_move_form2" id="menu_action_move_form2" parent="menu_traceability" sequence="3" groups="stock.group_locations"/>
1211
1212         <!--
1213             Reception Picking (By Stock Move)
1214             From stock_partial_move_view
1215         -->
1216         <record id="view_move_tree_reception_picking" model="ir.ui.view">
1217             <field name="name">stock.move.tree2</field>
1218             <field name="model">stock.move</field>
1219             <field name="priority" eval="6"/>
1220             <field name="arch" type="xml">
1221                 <tree colors="grey:state == 'cancel'" string="Moves">
1222                     <field name="date" widget="date"/>
1223                     <field name="picking_id" string="Reference" invisible="1"/>
1224                     <field name="origin"/>
1225                     <field name="partner_id" string="Supplier"/>
1226                     <field name="product_id"/>
1227                     <field name="product_uom_qty"/>
1228                     <field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
1229                     <field name="location_id" invisible="1"/>
1230                     <field name="location_dest_id" invisible="1"/>
1231                     <field name="create_date" invisible="1"/>
1232                     <field name="date_expected" invisible="1"/>
1233                     <button name="%(stock.move_scrap)d"
1234                         string="Scrap Products" type="action"
1235                         icon="terp-gtk-jump-to-ltr" context="{'scrap': True}"
1236                         states="draft,waiting,confirmed,assigned"/>
1237                     <field name="state"/>
1238                     <button name="action_done" states="draft,assigned,confirmed"
1239                         icon="gtk-go-forward" type="object"
1240                         class="oe_highlight" help="Done"/>
1241                 </tree>
1242             </field>
1243         </record>
1244
1245         <!-- test -->
1246         <record id="view_move_tree_reception_picking_board" model="ir.ui.view">
1247             <field name="name">stock.move.tree3</field>
1248             <field name="model">stock.move</field>
1249             <field eval="6" name="priority"/>
1250             <field name="arch" type="xml">
1251                 <tree string="Moves">
1252                     <field name="picking_id" string="Reference"/>
1253                     <field name="product_id"/>
1254                     <field name="product_uom_qty"/>
1255                     <field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
1256                     <field name="date" groups="base.group_no_one"/>
1257                 </tree>
1258             </field>
1259         </record>
1260
1261         <record id="action_reception_picking_move" model="ir.actions.act_window">
1262             <field name="name">Incoming  Products</field>
1263             <field name="res_model">stock.move</field>
1264             <field name="type">ir.actions.act_window</field>
1265             <field name="view_type">form</field>
1266             <field name="view_mode">tree,form</field>
1267             <field name="domain" eval="['|','&amp;',('picking_id','=',False),('location_dest_id.usage', 'in', ['customer','supplier']),'&amp;',('picking_id','!=',False),('picking_id.picking_type_id.code','=','outgoing')]"/>
1268             <field name="view_id" ref="view_move_tree_reception_picking"/>
1269             <field name="context">{'product_receive': True, 'search_default_future': True}</field>
1270             <field name="help" type="html">
1271               <p class="oe_view_nocontent_create">
1272                 Click to register a product reception. 
1273               </p><p>
1274                 Here you can receive individual products, no matter what
1275                 purchase order or picking order they come from. You will find
1276                 the list of all products you are waiting for. Once you receive
1277                 an order, you can filter based on the name of the supplier or
1278                 the purchase order reference. Then you can confirm all products
1279                 received using the buttons on the right of each line.
1280               </p>
1281             </field>
1282         </record>
1283
1284         <!-- Stock incoterms -->
1285         <record id="view_incoterms_tree" model="ir.ui.view">
1286             <field name="name">stock.incoterms.tree</field>
1287             <field name="model">stock.incoterms</field>
1288             <field name="arch" type="xml">
1289                 <tree string="Incoterms">
1290                     <field name="code"/>
1291                     <field colspan="4" name="name"/>
1292                 </tree>
1293             </field>
1294         </record>
1295         <record id="stock_incoterms_form" model="ir.ui.view">
1296             <field name="name">stock.incoterms.form</field>
1297             <field name="model">stock.incoterms</field>
1298             <field name="arch" type="xml">
1299                 <form string="Incoterms" version="7.0">
1300                     <sheet>
1301                         <field name="name"/>
1302                         <field name="code"/>
1303                         <field name="active"/>
1304                     </sheet>
1305                 </form>
1306             </field>
1307         </record>
1308         <record id="action_incoterms_tree" model="ir.actions.act_window">
1309             <field name="name">Incoterms</field>
1310             <field name="res_model">stock.incoterms</field>
1311             <field name="type">ir.actions.act_window</field>
1312             <field name="view_type">form</field>
1313             <field name="view_mode">tree,form</field>
1314         </record>
1315
1316         <menuitem action="action_incoterms_tree" id="menu_action_incoterm_open" parent="menu_warehouse_config" sequence="1"/>
1317
1318
1319          <record id="view_pickingtype_filter" model="ir.ui.view">
1320             <field name="name">stock.picking.type.filter</field>
1321             <field name="model">stock.picking.type</field>
1322             <field name="arch" type="xml">
1323                 <search string="Picking Type">
1324                     <field name="name"/>
1325                     <field name="sequence_id"/>
1326                     <field name="warehouse_id"/>
1327                 </search>
1328             </field>
1329         </record>
1330         <record model="ir.ui.view" id="view_picking_type_tree">
1331             <field name="name">Picking types</field>
1332             <field name="model">stock.picking.type</field>
1333             <field name="arch" type="xml">
1334                 <tree string="Picking Types">
1335                     <field name="name"/>
1336                     <field name="warehouse_id"/>
1337                     <field name="sequence_id"/>
1338                 </tree>
1339             </field>
1340         </record>
1341         <record model="ir.ui.view" id="view_picking_type_form">
1342             <field name="name">Picking Types</field>
1343             <field name="model">stock.picking.type</field>
1344             <field name="arch" type="xml">
1345                 <form string="Picking Types" version="7.0">
1346                     <sheet>
1347                         <group>
1348                             <group>
1349                                 <field name="name"/>
1350                                 <field name="sequence_id"/>
1351                                 <field name="warehouse_id"/>
1352                             </group>
1353                             <group>
1354                                 <field name="code" on_change="onchange_picking_code(code)"/>
1355                                 <field name="return_picking_type_id"/>
1356                             </group>
1357                         </group>
1358                         <separator string="Locations"/>
1359                         <group>
1360                             <field name="default_location_src_id" attrs="{'required': [('code', '=', 'internal')]}"/>
1361                             <field name="default_location_dest_id" attrs="{'required': [('code', 'in', ('internal', 'incoming'))]}"/>
1362                         </group>
1363                     </sheet>
1364                 </form>
1365             </field>
1366         </record>
1367
1368
1369         <record id="stock_picking_type_kanban" model="ir.ui.view">
1370             <field name="name">stock.picking.type.kanban</field>
1371             <field name="model">stock.picking.type</field>
1372             <field name="arch" type="xml">
1373                 <kanban version="7.0" class="oe_background_grey" create="0">
1374                     <field name="complete_name"/>
1375                     <field name="color"/>
1376                     <field name="count_picking_ready"/>
1377                     <field name="count_picking_draft"/>
1378                     <field name="count_picking_waiting"/>
1379                     <field name="count_picking_late"/>
1380                     <field name="count_picking_backorders"/>
1381                     <templates>
1382                         <t t-name="kanban-box">
1383                             <div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_stock_picking_type">
1384                                 <div class="oe_dropdown_toggle oe_dropdown_kanban" groups="stock.group_stock_manager">
1385                                     <span class="oe_e">í</span>
1386                                     <ul class="oe_dropdown_menu">
1387                                         <t t-if="widget.view.is_action_enabled('edit')"><li><a type="edit">Edit...</a></li></t>
1388                                         <t t-if="widget.view.is_action_enabled('delete')"><li><a type="delete">Delete</a></li></t>
1389                                         <t t-if="widget.view.is_action_enabled('edit')"><li><ul class="oe_kanban_colorpicker" data-field="color"/></li></t>
1390                                     </ul>
1391                                 </div>
1392                                 <div class="oe_kanban_content">
1393                                     <h4 class="oe_center"><field name="complete_name"/></h4>
1394                                     <div class="oe_right">
1395                                         <a name="open_barcode_interface" type="object">
1396                                             <img src="/stock/static/src/img/scan.png" 
1397                                                 alt="Click to launch the barcode interface"
1398                                                 class="oe_stock_scan_image" title="Click to launch the barcode interface"/>
1399                                         </a>
1400                                     </div>
1401                                     <div class="oe_items_list oe_kanban_ellipsis">
1402                                         <div>
1403                                             <a name="%(action_picking_tree_ready)d" type="action">
1404                                                 <field name="count_picking_ready"/> Ready
1405                                             </a>
1406                                             <a name="%(action_picking_tree_done)d" type="action" class="oe_sparkline_bar_link">
1407                                                 <field name="last_done_picking" widget="sparkline_bar" options="{'type': 'tristate', 'colorMap': {'0': 'orange', '-1': 'red', '1': 'green'}}">Last 10 Done Operations</field>
1408                                             </a>
1409                                         </div>
1410                                         <div t-if="record.count_picking_waiting.raw_value &gt; 0">
1411                                             <a name="%(action_picking_tree_waiting)d" type="action">
1412                                                 <field name="count_picking_waiting"/> Waiting Availability
1413                                             </a>
1414                                         </div>
1415                                         <div>
1416                                             <a name="%(action_picking_tree)d" type="action">All Operations</a>
1417                                         </div>
1418                                     </div>
1419                                     <div class="oe_picking_type_gauge">
1420                                         <field name="rate_picking_late" widget="gauge" style="width:150px; height: 110px;" options="{'levelcolors': ['#a9d70b', '#f9c802', '#ff0000'], 'action_jump': '%(action_picking_tree_late)d'}">Late (%%)</field>
1421                                         <field name="rate_picking_backorders" widget="gauge" style="width:150px; height: 110px;">Backorders (%%)</field>
1422                                         <div class="oe_gauge_labels">
1423                                             <div class="oe_gauge_label_column">
1424                                                 <a name="%(action_picking_tree_late)d" type="action">
1425                                                     <field name="count_picking_late"/> Late
1426                                                 </a>
1427                                             </div>
1428                                             <div class="oe_gauge_label_column">
1429                                                 <a name="%(action_picking_tree_backorder)d" type="action">
1430                                                     <field name="count_picking_backorders"/> Backorders
1431                                                 </a>
1432                                             </div>
1433                                         </div>
1434                                     </div>
1435
1436                                 </div>
1437                             </div>
1438                         </t>
1439                     </templates>
1440                 </kanban>
1441             </field>
1442         </record>
1443
1444         <record id="action_picking_type_form" model="ir.actions.act_window">
1445             <field name="name">All Operations</field>
1446             <field name="res_model">stock.picking.type</field>
1447             <field name="type">ir.actions.act_window</field>
1448             <field name="view_type">form</field>
1449             <field name="view_mode">kanban,form</field>
1450             <field name="help" type="html">
1451               <p class="oe_view_nocontent_create">
1452                 Click to create a new picking type. 
1453               </p><p>
1454                 The picking type system allows you to assign each stock
1455                 operation a specific type which will alter its views accordingly.  
1456                 On the picking type you could e.g. specify if packing is needed by default, 
1457                 if it should show the customer.  
1458               </p>
1459             </field>
1460         </record>
1461         
1462         <record id="action_picking_type_list" model="ir.actions.act_window">
1463             <field name="name">All Operations</field>
1464             <field name="res_model">stock.picking.type</field>
1465             <field name="type">ir.actions.act_window</field>
1466             <field name="view_type">form</field>
1467             <field name="view_mode">list,form</field>            
1468         </record>
1469
1470         <menuitem
1471             action="action_picking_type_form"
1472             id="menu_action_picking_type_form"
1473             parent="menu_stock_warehouse_mgmt" sequence="1"/>
1474
1475         <menuitem 
1476             id="menu_pickingtype" 
1477             name="Types of Operation" 
1478             parent="stock.menu_stock_configuration" 
1479             action="action_picking_type_list" />
1480         
1481
1482         <!-- Order Point -->
1483         <record id="view_warehouse_orderpoint_tree" model="ir.ui.view">
1484             <field name="name">stock.warehouse.orderpoint.tree</field>
1485             <field name="model">stock.warehouse.orderpoint</field>
1486             <field name="arch" type="xml">
1487                 <tree string="Reordering Rules">
1488                     <field name="name"/>
1489                     <field name="warehouse_id" groups="stock.group_locations"/>
1490                     <field name="location_id" groups="stock.group_locations"/>
1491                     <field name="product_id"/>
1492                     <field name="product_uom" groups="product.group_uom"/>
1493                     <field name="product_min_qty"/>
1494                     <field name="product_max_qty"/>
1495                 </tree>
1496             </field>
1497         </record>
1498
1499         <record model="ir.ui.view" id="warehouse_orderpoint_search">
1500             <field name="name">stock.warehouse.orderpoint.search</field>
1501             <field name="model">stock.warehouse.orderpoint</field>
1502             <field name="arch" type="xml">
1503                 <search string="Reordering Rules Search">
1504                     <field name="name" string="Reordering Rules"/>
1505                     <field name="warehouse_id"/>
1506                     <field name="location_id" groups="stock.group_locations"/>
1507                     <field name="company_id" groups="base.group_multi_company"/>
1508                     <field name="product_id"/>
1509                     <group expand="0" string="Group By">
1510                         <filter string="Warehouse" icon="terp-go-home" domain="[]"  context="{'group_by':'warehouse_id'}"/>
1511                         <filter string="Location" icon="terp-go-home" domain="[]" context="{'group_by':'location_id'}"/>
1512                     </group>
1513                 </search>
1514             </field>
1515         </record>
1516
1517         <record id="view_warehouse_orderpoint_form" model="ir.ui.view">
1518             <field name="name">stock.warehouse.orderpoint.form</field>
1519             <field name="model">stock.warehouse.orderpoint</field>
1520             <field name="arch" type="xml">
1521                 <form string="Reordering Rules" version="7.0">
1522                     <sheet>
1523                         <div class="oe_right oe_button_box">
1524                             <button name="action_view_proc_to_process" type="object" string="Procurement Orders to Process"/>                            
1525                         </div>
1526                         <group>
1527                             <group>
1528                                 <field name="name" />
1529                                 <field name="product_id" on_change="onchange_product_id(product_id)"/>
1530                             </group>
1531                             <group>
1532                                 <field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)" widget="selection" groups="stock.group_locations"/>
1533                                 <field name="product_uom" groups="product.group_uom"/>
1534                                 <field name="location_id" groups="stock.group_locations"/>
1535                                 <field name="group_id" groups="stock.group_adv_location"/>
1536                                 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
1537                             </group>
1538                         </group>
1539                         <group>
1540                             <group string="Rules">
1541                                 <field name="product_min_qty" />
1542                                 <field name="product_max_qty" />
1543                                 <field name="qty_multiple" string="Quantity Multiple"/>
1544                             </group>
1545                             <group string="Misc">
1546                                 <field name="active" />
1547                             </group>
1548                         </group>                        
1549                     </sheet>
1550                 </form>
1551             </field>
1552         </record>
1553
1554         <record id="action_orderpoint_form" model="ir.actions.act_window">
1555             <field name="name">Reordering Rules</field>
1556             <field name="res_model">stock.warehouse.orderpoint</field>
1557             <field name="type">ir.actions.act_window</field>
1558             <field name="view_type">form</field>
1559             <field name="view_id" ref="view_warehouse_orderpoint_tree"/>
1560             <field name="search_view_id" ref="warehouse_orderpoint_search" />
1561             <field name="help" type="html">
1562               <p class="oe_view_nocontent_create">
1563                 Click to add a reordering rule.
1564               </p><p>You can define your minimum stock rules, so that OpenERP will automatically create draft manufacturing orders or request for quotations according to the stock level. Once the virtual stock of a product (= stock on hand minus all confirmed orders and reservations) is below the minimum quantity, OpenERP will generate a procurement request to increase the stock up to the maximum quantity.</p>
1565             </field>
1566         </record>
1567
1568         <act_window
1569             context="{'search_default_warehouse_id': active_id, 'default_warehouse_id': active_id}"
1570             id="act_stock_warehouse_2_stock_warehouse_orderpoint"
1571             name="Reordering Rules"
1572             res_model="stock.warehouse.orderpoint"
1573             src_model="stock.warehouse"
1574             groups="stock.group_stock_user"/>
1575
1576         <!-- Procurements -->
1577
1578         <record id="view_procurement_form_stock_inherit" model="ir.ui.view">
1579             <field name="name">procurement.order.form.stock.inherit</field>
1580             <field name="model">procurement.order</field>
1581             <field name="inherit_id" ref="procurement.procurement_form_view"/>
1582             <field name="arch" type="xml">
1583                 <xpath expr="//group[@name='scheduling']" position="before">
1584                     <group>
1585                         <field name="warehouse_id" on_change="change_warehouse_id(warehouse_id, context)"/>
1586                         <field name="location_id" domain="[('usage', '=', 'internal')]"/>
1587                         <field name="route_ids" widget="many2many_tags"/>
1588                     </group>
1589                 </xpath>
1590                 <xpath expr="//div[@name='button_box']" position="inside">
1591                     <button name="do_view_pickings" string="Group's Pickings" type="object"/>
1592                 </xpath>
1593                 <xpath expr="//field[@name='rule_id']" position="replace">
1594                     <field name="rule_id" domain="['|', ('location_id', '=', False), ('location_id', '=', location_id)]"/>
1595                     <field name="partner_dest_id"/>
1596                 </xpath>
1597             </field>
1598         </record>
1599         <record id="view_procurement_tree_stock_inherit" model="ir.ui.view">
1600             <field name="name">procurement.order.tree.stock.inherit</field>
1601             <field name="model">procurement.order</field>
1602             <field name="inherit_id" ref="procurement.procurement_tree_view"/>
1603             <field name="arch" type="xml">
1604                 <xpath expr="//field[@name='origin']" position="before">
1605                     <field name="location_id"/>
1606                 </xpath>
1607             </field>
1608         </record>
1609         <record id="view_procurement_rule_tree_stock_inherit" model="ir.ui.view">
1610             <field name="name">procurement.rule.tree.stock.inherit</field>
1611             <field name="model">procurement.rule</field>
1612             <field name="inherit_id" ref="procurement.view_procurement_rule_tree"/>
1613             <field name="arch" type="xml">
1614                 <xpath expr="//field[@name='action']" position="after">
1615                     <field name="picking_type_id"/>
1616                 </xpath>
1617             </field>
1618         </record>
1619
1620         <record id="view_procurement_rule_form_stock_inherit" model="ir.ui.view">
1621             <field name="name">procurement.rule.form.stock.inherit</field>
1622             <field name="model">procurement.rule</field>
1623             <field name="inherit_id" ref="procurement.view_procurement_rule_form"/>
1624             <field name="arch" type="xml">
1625                 <xpath expr="//field[@name='action']" position="before">
1626                     <field name="location_id"/>
1627                     <field name="warehouse_id" groups="base.group_no_one"/>
1628                     <field name="route_id" groups="base.group_no_one"/>
1629                 </xpath>
1630                 <xpath expr="//field[@name='action']" position="after">
1631                     <field name="picking_type_id" attrs="{'required': [('action', '!=', 'manufacture')]}"/>
1632                 </xpath>
1633                 <xpath expr="//field[@name='group_id']" position="after">
1634                     <field name="propagate"/>
1635                     <field name="propagate_warehouse_id"/>
1636                 </xpath>
1637                 <xpath expr="//group[@name='propagation_group']" position="before">
1638                     <group attrs="{'invisible': [('action', '!=', 'move')]}" string="Moving Options">
1639                         <field name="procure_method" groups="stock.group_adv_location"/>
1640                         <field name="location_src_id" attrs="{'required': [('action', '=', 'move')]}"/>
1641                         <field name="partner_address_id" groups="stock.group_adv_location" context="{'show_address': 1}" options="{'always_reload': 1}"/>
1642                         <label for="delay" string="Delay"  groups="stock.group_adv_location"/>
1643                         <div groups="stock.group_adv_location">
1644                            <field name="delay" class="oe_inline"/>days
1645                         </div>
1646                     </group>
1647                 </xpath>
1648             </field>
1649         </record>
1650         
1651         <record model="ir.actions.act_window" id="procrules">
1652             <field name="context">{}</field>
1653             <field name="name">Pull Rules</field>
1654             <field name="res_model">procurement.rule</field>
1655         </record>
1656         
1657         <record id="quant_search_view" model="ir.ui.view">
1658             <field name="name">stock.quant.search</field>
1659             <field name="model">stock.quant</field>
1660             <field eval="10" name="priority"/>
1661             <field name="arch" type="xml">
1662                 <search string="Quants">
1663                     <field name="product_id"/>
1664                     <field name="location_id"/>
1665                     <field name="package_id" groups="stock.group_tracking_lot"/>
1666                     <field name="lot_id" groups="stock.group_production_lot"/>
1667                     <field name="owner_id" groups="stock.group_tracking_owner"/>
1668                     <group expand='0' string='Filters'>
1669                         <filter name='internal_loc' string="Internal Locations" domain="[('location_id.usage','=', 'internal')]"/>
1670                     </group>
1671                     <group expand='0' string='Group by...'>
1672                        <filter name="productgroup" string='Product' context="{'group_by' : 'product_id'}"/>
1673                        <filter string='Owner' context="{'group_by' : 'owner_id'}" groups="stock.group_tracking_owner"/>
1674                        <filter string='Lot' context="{'group_by' : 'lot_id'}" groups="stock.group_production_lot"/>
1675                        <filter name="locationgroup" string='Location' icon="terp-stock_symbol-selection" domain="[]" context="{'group_by' : 'location_id'}"/>
1676                        <filter string='Package' icon="terp-stock_symbol-selection" domain="[]" context="{'group_by' : 'package_id'}" groups="stock.group_tracking_lot"/>
1677                        <filter string='Packaging' icon="terp-stock_symbol-selection" domain="[]" context="{'group_by' : 'packaging_type_id'}" groups="stock.group_tracking_lot"/>
1678                        <filter string='Company' icon="terp-go-home" domain="[]" context="{'group_by' : 'company_id'}" groups="base.group_multi_company"/>
1679                    </group>
1680                 </search>
1681             </field>
1682         </record>
1683         
1684         <record model="ir.actions.act_window" id="quantsact">
1685             <field name="name">Quants</field>
1686             <field name="res_model">stock.quant</field>
1687             <field name="view_type">form</field>
1688             <field name="view_mode">tree,form,graph</field>
1689             <field name="help">This analysis gives you a fast overview on the current stock level of your products and their today's inventory value.</field>
1690         </record>
1691
1692         <record model="ir.ui.view" id="view_stock_quant_form">
1693             <field name="name">stock.quant.form</field>
1694             <field name="model">stock.quant</field>
1695             <field eval="10" name="priority"/>
1696             <field name="arch" type="xml">
1697                 <form string="Quants" version="7.0">
1698                     <div class="oe_right oe_button_box">
1699                         <button name="action_view_quant_history" type="object" string="Quant History"/>                            
1700                     </div>
1701                     <group>
1702                         <field name="product_id"/>
1703                         <field name="qty"/>
1704                         <field name="lot_id" groups="stock.group_production_lot"/>
1705                         <field name="package_id" groups="stock.group_tracking_lot"/>
1706                         <field name="location_id"/>
1707                         <field name="in_date"/>
1708                         <field name="reservation_id"/>
1709                         <field name="propagated_from_id"/>
1710                         <field name="owner_id" groups="stock.group_tracking_owner"/>
1711                         <field name="inventory_value"/>
1712                     </group>
1713                 </form>
1714             </field>
1715         </record>
1716
1717
1718         <record model="ir.ui.view" id="view_stock_quant_tree">
1719             <field name="name">stock.quant.tree</field>
1720             <field name="model">stock.quant</field>
1721             <field eval="10" name="priority"/>
1722             <field name="arch" type="xml">
1723                 <tree string="Quants" create="0">
1724                     <field name="product_id"/>
1725                     <field name="qty"/>
1726                     <field name="location_id"/>
1727                     <field name="owner_id" groups="stock.group_tracking_owner"/>
1728                     <field name="lot_id" groups="stock.group_production_lot"/>
1729                     <field name="package_id" groups="stock.group_tracking_lot"/>
1730                     <field name="packaging_type_id" invisible="1"/>
1731                     <field name="in_date"/>
1732                     <field name="inventory_value"/>
1733                     <field name="reservation_id" invisible='1'/>
1734                     <field name="propagated_from_id" invisible='1'/>
1735                     <field name='company_id' groups="base.group_multi_company"/>
1736                 </tree>
1737             </field>
1738         </record>
1739
1740        <record model="ir.ui.view" id="view_stock_quant_graph_value">
1741             <field name="name">stock.quant.graph</field>
1742             <field name="model">stock.quant</field>
1743             <field eval="12" name="priority"/>
1744             <field name="arch" type="xml">
1745                 <graph string="Quants">
1746                     <field name="product_id"/>
1747                     <field name="qty"/>
1748                     <field name="location_id"/>
1749                 </graph>
1750             </field>
1751         </record>
1752
1753         <!-- Procurements are located in Warehouse menu hierarchy, MRP users should come to Stock application to use it.  -->
1754         <menuitem id="menu_stock_sched" name="Schedulers" parent="stock.menu_stock_root" sequence="4" groups="stock.group_stock_manager"/>
1755         <menuitem action="action_procurement_compute" id="menu_procurement_compute" parent="menu_stock_sched" groups="base.group_no_one"/>
1756         <menuitem action="procurement.action_compute_schedulers" id="menu_stock_proc_schedulers" parent="menu_stock_sched" sequence="20" groups="stock.group_stock_manager"/>
1757         <menuitem action="procurement.procurement_exceptions" id="menu_stock_procurement_action" parent="menu_stock_sched" sequence="50" groups="stock.group_stock_manager"/>
1758         <menuitem id="menu_stock_procurement" name="Automatic Procurements" parent="stock.menu_stock_configuration" sequence="5"/>
1759         <menuitem action="action_orderpoint_form" id="menu_stock_order_points" parent="stock.menu_stock_configuration" sequence="10"/>
1760         <menuitem id="stock.next_id_61" name="Warehouse" sequence="15" parent="base.menu_reporting" groups="group_stock_manager"/>
1761         <menuitem id="menu_quants" name="Quants" parent="menu_traceability" sequence="20" action="quantsact" groups="base.group_no_one"/>
1762         <menuitem id="menu_procurement_rules" name="Procurement Rules" parent="stock.menu_stock_configuration" action="procrules" groups="base.group_no_one"/>
1763         <menuitem id="menu_pickingtype" name="Types of Operation" parent="stock.menu_stock_configuration" action="action_picking_type_list"/>
1764
1765
1766         <record model="ir.actions.act_window" id="product_open_orderpoint">
1767             <field name="context">{'default_product_id': active_id, 'search_default_product_id': active_id}</field>
1768             <field name="name">Reordering Rules</field>
1769             <field name="res_model">stock.warehouse.orderpoint</field>
1770         </record>
1771         <record model="ir.actions.act_window" id="product_open_quants">
1772             <field name="context">{'search_default_product_id': active_id, 'search_default_locationgroup':1}</field>
1773             <field name="name">Quants</field>
1774             <field name="res_model">stock.quant</field>
1775         </record>
1776         
1777         <record model="ir.ui.view" id="view_quant_package_form">
1778             <field name="name">stock.quant.package.form</field>
1779             <field name="model">stock.quant.package</field>
1780             <field eval="10" name="priority"/>
1781             <field name="arch" type="xml">
1782                 <form string="Package" version="7.0">
1783                     <sheet>
1784                         <div class="oe_right oe_button_box">
1785                             <button name="unpack" string="Unpack" type="object"/>
1786                         </div>
1787                         <div class="oe_title">
1788                             <label for="name" string="Package Reference" class="oe_edit_only"/>
1789                             <h1><field name="name" class="oe_inline"/></h1>
1790                         </div>
1791                         <group>
1792                             <group>
1793                                <field name="ul_id"/>
1794                                <field name="packaging_id"/>
1795                                <field name='company_id' groups="base.group_multi_company"/>
1796                                <field name='owner_id' groups="stock.group_tracking_owner"/>
1797                             </group>
1798                             <group>
1799                             <field name="location_id"/>
1800                             <field name="parent_id"/>
1801                             </group>
1802                         </group>
1803                         <notebook>
1804                             <page string="Content">
1805                                 <separator string="Bulk Content" />
1806                                 <field name="quant_ids">
1807                                     <tree string="Quants">
1808                                         <field name="product_id"/>
1809                                         <field name="qty"/>
1810                                         <field name="location_id"/>
1811                                         <field name="in_date"/>
1812                                     </tree>
1813                                 </field>
1814
1815                                 <div class="oe_right oe_button_box" style="margin-top: 10px">
1816                                     <button name="get_content_package" type="object" string="View Contained Packages content" icon="gtk-execute" attrs="{'invisible': [('children_ids','=',[])]}"/>
1817                                 </div>
1818                                 <separator string="Contained Packages"/>
1819                                 <field name="children_ids">
1820                                     <tree string="Contained Packages">
1821                                         <field name="complete_name"/>
1822                                         <field name="ul_id"/>
1823                                         <field name="packaging_id"/>
1824                                         <field name="location_id"/>
1825                                     </tree>
1826                                 </field>
1827                             </page>
1828                         </notebook> 
1829                     </sheet>
1830                 </form>
1831             </field>
1832         </record>
1833         
1834         
1835         <record model="ir.ui.view" id="view_quant_package_tree">
1836             <field name="name">stock.quant.package.tree</field>
1837             <field name="model">stock.quant.package</field>
1838             <field eval="10" name="priority"/>
1839             <field name="arch" type="xml">
1840                 <tree string="Package">
1841                     <field name="complete_name"/>
1842                     <field name="ul_id"/>
1843                     <field name="packaging_id"/>
1844                     <field name="location_id"/>
1845                     <field name="company_id"/>
1846                 </tree>
1847             </field>
1848         </record>
1849         <record id="quant_package_search_view" model="ir.ui.view">
1850             <field name="name">stock.quant.package.search</field>
1851             <field name="model">stock.quant.package</field>
1852             <field eval="10" name="priority"/>
1853             <field name="arch" type="xml">
1854                 <search string="Package">
1855                     <field name="name" string="Package Name"/>
1856                     <field name="location_id"/>
1857                     <field name="ul_id"/>
1858                     <field name="packaging_id"/>
1859                     <group  expand='0' string='Group by...'>
1860                        <filter string='Location' icon="terp-stock_symbol-selection" domain="[]" context="{'group_by' : 'location_id'}"/>
1861                        <filter string='Packaging' icon="terp-stock_symbol-selection" domain="[]" context="{'group_by' : 'packaging_id'}"/>
1862                        <filter string='Company' icon="terp-go-home" domain="[]" context="{'group_by' : 'company_id'}" groups="base.group_multi_company"/>
1863                    </group>
1864                 </search>
1865             </field>
1866         </record>
1867         <record model="ir.actions.act_window" id="action_package_view">
1868             <field name="context">{}</field>
1869             <field name="name">Packages</field>
1870             <field name="res_model">stock.quant.package</field>
1871             <field name="help" type="html">
1872                 <p>Packages are usually created by pack operations made on transfers and can contains several different products. You can then reuse a package to move its whole content somewhere else, or to pack it into another bigger package. A package can also be unpacked, allowing the disposal of its former content as single units again.
1873                 </p>
1874             </field>
1875         </record>
1876         <menuitem id="menu_package" name="Packages" parent="menu_stock_product" action="action_package_view" groups="stock.group_tracking_lot"/>
1877         
1878         
1879         <!--Routes-->
1880         <record id="stock_location_route_tree" model="ir.ui.view">
1881             <field name="name">stock.location.route.tree</field>
1882             <field name="model">stock.location.route</field>
1883             <field name="arch" type="xml">
1884                 <tree string="Routes">
1885                     <field name="sequence" widget="handle" />
1886                     <field name="name"/>
1887                 </tree>
1888             </field>
1889         </record>
1890
1891         <record id="stock_location_route_form_view" model="ir.ui.view">
1892             <field name="name">stock.location.route.form</field>
1893             <field name="model">stock.location.route</field>
1894             <field eval="7" name="priority" />
1895             <field name="arch" type="xml">
1896                 <form string="Route" version="7.0">
1897                     <sheet>
1898                         <div class="oe_title">
1899                             <label for="name" class="oe_edit_only"/>
1900                             <h1><field name="name"/></h1>
1901                         </div>
1902                     <group>
1903                         <group>
1904                             <field name="company_id" groups="base.group_multi_company" widget="selection"/>
1905                             <field name="active" groups="stock.group_adv_location" />
1906                         </group>
1907                         <group>
1908                             <field name="sequence" string="Sequence" groups="base.group_no_one"/>
1909                         </group>
1910                     </group>
1911                     <separator string="Applicable On"/>
1912                     <p class="oe_grey">Select the places where this route can be selected</p>
1913                     <group>
1914                         <group>
1915                             <field name="product_categ_selectable" string="Product Categories"/>
1916                             <field name="product_selectable" string="Products"/>
1917                         </group>
1918                         <group>
1919                             <field name="warehouse_selectable" string="Warehouses"/>
1920                         </group>
1921                     </group>
1922                     <group string="Push Rules" colspan="4" >
1923                         <field name="push_ids" colspan="4" nolabel="1"/>
1924                     </group>
1925                     <group string="Pull Rules" colspan="4" >
1926                         <field name="pull_ids" colspan="4" nolabel="1"/>
1927                     </group>
1928                     </sheet>
1929                 </form>
1930             </field>
1931         </record>
1932         
1933         <record id="action_routes_form" model="ir.actions.act_window">
1934             <field name="name">Routes</field>
1935             <field name="res_model">stock.location.route</field>
1936             <field name="type">ir.actions.act_window</field>
1937             <field name="view_type">form</field>
1938             <field name="view_mode">tree,form</field>
1939             <field name="view_id" ref="stock_location_route_tree" />
1940             <field name="help" type="html">
1941                 <p class="oe_view_nocontent_create">
1942                     Click to add a route.
1943               </p>
1944                 <p>You can define here the main routes that run through
1945                     your warehouses and that define the flows of your products. These
1946                     routes can be assigned to a product, a product category or be fixed
1947                     on procurement or sales order. </p>
1948             </field>
1949         </record>
1950         
1951         <menuitem action="action_routes_form" id="menu_stock_routes"
1952             parent="stock.menu_stock_configuration" sequence="11" />
1953
1954         <record id="do_view_pickings" model="ir.actions.act_window">
1955             <field name="name">Pickings for Groups</field>
1956             <field name="res_model">stock.picking</field>
1957             <field name="view_type">form</field>
1958             <field name="view_mode">tree,form</field>
1959         <field name="domain">[('group_id','=',active_id)]</field>
1960         </record>
1961         <record id="procurement_group_form_view_herited" model="ir.ui.view">
1962             <field name="name">procurement.group.form.herited</field>
1963             <field name="model">procurement.group</field>
1964             <field name="inherit_id" ref="procurement.procurement_group_form_view"/>
1965             <field name="arch" type="xml">
1966                 <xpath expr="//div[@name='button_box']" position="inside">
1967                     <button name="%(do_view_pickings)d" string="Pickings" type="action"/>
1968                 </xpath>        
1969             </field>
1970         </record>
1971         
1972     </data>
1973 </openerp>