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