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