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