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