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