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