[FIX] Change two-one step wh, multi-comp wh, quantity field float, show product_uom_q...
[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_transfer" states="assigned" string="Transfer" groups="stock.group_stock_user" type="object" class="oe_highlight" attrs="{'invisible': ['|', ('pack_operation_exist', '=', True)]}"/>
638                     <button name="do_partial_open_barcode" string="Enter Transfer Details" groups="stock.group_stock_user" type="object" class="oe_highlight" attrs="{'invisible': ['|',('pack_operation_exist', '=', True),('state','not in',('assigned', 'partially_available'))]}"/>
639                     <button name="open_barcode_interface" string="Open Barcode interface" groups="stock.group_stock_user" type="object" class="oe_highlight" attrs="{'invisible': ['|',('pack_operation_exist', '=', False),('state','not in',('assigned', 'partially_available'))]}"/>
640                     <button name="do_print_picking" string="Print Picking List" groups="stock.group_stock_user" type="object" attrs="{'invisible': ['|', ('picking_type_code', '=', 'outgoing'), ('state', '!=', 'assigned')]}"/>
641                     <button name="%(act_stock_return_picking)d" string="Reverse Transfer" states="done" type="action" groups="base.group_user"/>
642                     <button name="action_cancel" states="assigned,confirmed,partially_available,draft" string="Cancel Transfer" groups="base.group_user" type="object"/>
643                     <button name="do_unreserve" string="Unreserve" groups="base.group_user" type="object" attrs="{'invisible': [('quant_reserved_exist', '=', False)]}"/>
644                     <field name="state" widget="statusbar" statusbar_visible="draft,confirmed,partially_available,assigned,done" statusbar_colors='{"shipping_except":"red","invoice_except":"red","waiting_date":"blue"}'/>
645                 </header>
646                 <sheet>
647                     <div class="oe_right oe_button_box">
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 Done" attrs="{'invisible': ['|', ('state','!=','done'), ('pack_operation_ids','=',[])]}">
677                             <field name="pack_operation_ids">
678                                 <tree editable="top">   
679                                     <field name="location_id"/>
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="package_id" groups="stock.group_tracking_lot"/>
684                                     <field name="owner_id" groups="stock.group_tracking_owner"/>
685                                     <field name="product_qty" attrs="{'required': [('product_id', '!=', False)]}"/>
686                                     <field name="location_dest_id"/>
687                                     <field name="result_package_id" groups="stock.group_tracking_lot"/>
688                                 </tree>
689                             </field>
690                         </page>
691                         <page string="Additional Info">
692                             <group string="General Informations">
693                                 <group>
694                                     <field name="move_type"/>
695                                     <field name="picking_type_id"/>
696                                     <field name="picking_type_code" invisible="1"/>
697                                     <field name="quant_reserved_exist" invisible="1"/>                                    
698                                     <field name="location_id" invisible="1"/>
699                                     <field name="location_dest_id" invisible="1"/>
700                                 </group>
701                                 <group>
702                                     <field name="company_id" groups="base.group_multi_company" widget="selection"/>
703                                     <field name="date_done" groups="base.group_no_one"/>
704                                     <field name="group_id"/>
705                                     <field name="priority"/>
706                                 </group>
707                             </group>
708                         </page>
709                     </notebook>
710                 </sheet>
711                 <div class="oe_chatter">
712                     <field name="message_follower_ids" widget="mail_followers"/>
713                     <field name="message_ids" widget="mail_thread"/>
714                 </div>
715                 </form>
716             </field>
717         </record>
718
719         <record id="view_picking_internal_search" model="ir.ui.view">
720             <field name="name">stock.picking.internal.search</field>
721             <field name="model">stock.picking</field>
722             <field name="arch" type="xml">
723                 <search string="Picking Lists">
724                     <field name="name" string="Picking List" filter_domain="['|',('name','ilike', self),('origin','ilike',self)]"/>
725                     <filter icon="terp-check" name="draft" string="Draft" domain="[('state','=','draft')]" help="Draft Moves"/>
726                     <filter icon="terp-check" name="available" string="Ready" domain="[('state','in',('assigned', 'partially_available'))]" help="Assigned Moves"/>
727                     <filter icon="terp-check" name="waiting" string="Waiting Availability" domain="[('state','=', 'confirmed')]" help="Waiting Moves"/>
728                     <filter icon="terp-camera_test" name="confirmed" string="Confirmed" domain="[('state','in', ('confirmed', 'waiting', 'assigned'))]" help="Confirmed Moves"/>
729                     <filter icon="terp-dialog-close" name="done" string="Done" domain="[('state','=','done')]" help="Pickings already processed"/>
730                     <separator/>
731                     <filter name="late" string="Late" domain="[('min_date','&lt;', time.strftime('%%Y-%%m-%%d'))]" help="Pickings that are late on scheduled time"/>
732                     <separator/>
733                     <filter name="backorder" string="Backorders" domain="[('backorder_id','&lt;&gt;', False)]" help="Remaining parts of picking partially processed"/>
734                     <field name="partner_id" filter_domain="[('partner_id','child_of',self)]"/>
735                     <field name="product_id"/>
736                     <field name="picking_type_id"/>
737                     <field name="group_id"/>
738                     <group expand="0" string="Group By">
739                         <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
740                         <filter string="Order Date" icon="terp-go-month" domain="[]"  context="{'group_by':'date'}"/>
741                         <filter string="Expected Date" icon="terp-go-month" domain="[]"  context="{'group_by':'min_date'}"/>
742                         <filter string="Origin" domain="[]" context="{'group_by':'origin'}"/>
743                         <filter string="Picking Type" domain="[]" context="{'group_by':'picking_type_id'}"/>
744                         <filter string="Procurement Group" domain="[]" context="{'group_by':'group_id'}"/>
745                     </group>
746                 </search>
747             </field>
748         </record>
749
750         <record id="action_picking_tree_all" model="ir.actions.act_window">
751             <field name="name">Stock Operations</field>
752             <field name="res_model">stock.picking</field>
753             <field name="type">ir.actions.act_window</field>
754             <field name="view_type">form</field>
755             <field name="view_mode">tree,form,calendar</field>
756             <field name="domain"></field>
757             <field name="context">{
758                     'contact_display': 'partner_address',
759             }
760             </field>
761             <field name="search_view_id" ref="view_picking_internal_search"/>
762         </record>
763
764         <record id="action_picking_tree_done" model="ir.actions.act_window">
765             <field name="name">Done Transfers</field>
766             <field name="res_model">stock.picking</field>
767             <field name="type">ir.actions.act_window</field>
768             <field name="view_type">form</field>
769             <field name="view_mode">tree,form,calendar</field>
770             <field name="domain"></field>
771             <field name="context">{
772                     'search_default_picking_type_id': [active_id],
773                     'default_picking_type_id': active_id,
774                     'contact_display': 'partner_address',
775                     'search_default_done': 1,
776             }
777             </field>
778             <field name="search_view_id" ref="view_picking_internal_search"/>
779         </record>
780
781         <record id="action_picking_tree_ready" model="ir.actions.act_window">
782             <field name="name">Ready Transfers</field>
783             <field name="res_model">stock.picking</field>
784             <field name="type">ir.actions.act_window</field>
785             <field name="view_type">form</field>
786             <field name="view_mode">tree,form,calendar</field>
787             <field name="domain"></field>
788             <field name="context">{
789                     'search_default_picking_type_id': [active_id],
790                     'default_picking_type_id': active_id,
791                     'contact_display': 'partner_address',
792                     'search_default_available': 1,
793             }
794             </field>
795             <field name="search_view_id" ref="view_picking_internal_search"/>
796         </record>
797
798         <record id="action_picking_tree_done_grouped" model="ir.actions.act_window">
799             <field name="name">Done Transfers by Date</field>
800             <field name="res_model">stock.picking</field>
801             <field name="type">ir.actions.act_window</field>
802             <field name="view_type">form</field>
803             <field name="view_mode">tree,form,calendar</field>
804             <field name="domain"></field>
805             <field name="context">{
806                     'search_default_picking_type_id': [active_id],
807                     'default_picking_type_id': active_id,
808                     'contact_display': 'partner_address',
809                     'search_default_done': 1,
810                     'group_by': ['date'],
811             }
812             </field>
813             <field name="search_view_id" ref="view_picking_internal_search"/>
814         </record>
815
816         <record id="action_picking_tree_waiting" model="ir.actions.act_window">
817             <field name="name">Waiting Availability Transfers</field>
818             <field name="res_model">stock.picking</field>
819             <field name="type">ir.actions.act_window</field>
820             <field name="view_type">form</field>
821             <field name="view_mode">tree,form,calendar</field>
822             <field name="domain"></field>
823             <field name="context">{
824                     'search_default_picking_type_id': [active_id],
825                     'default_picking_type_id': active_id,
826                     'contact_display': 'partner_address',
827                     'search_default_waiting': 1,
828             }
829             </field>
830             <field name="search_view_id" ref="view_picking_internal_search"/>
831         </record>
832
833         <record id="action_picking_tree_late" model="ir.actions.act_window">
834             <field name="name">Late Transfers</field>
835             <field name="res_model">stock.picking</field>
836             <field name="type">ir.actions.act_window</field>
837             <field name="view_type">form</field>
838             <field name="view_mode">tree,form,calendar</field>
839             <field name="domain"></field>
840             <field name="context">{
841                     'search_default_picking_type_id': [active_id],
842                     'default_picking_type_id': active_id,
843                     'contact_display': 'partner_address',
844                     'search_default_late': 1,
845                     'search_default_confirmed': 1,
846             }
847             </field>
848             <field name="search_view_id" ref="view_picking_internal_search"/>
849         </record>
850
851         <record id="action_picking_tree_backorder" model="ir.actions.act_window">
852             <field name="name">Backorders</field>
853             <field name="res_model">stock.picking</field>
854             <field name="type">ir.actions.act_window</field>
855             <field name="view_type">form</field>
856             <field name="view_mode">tree,form,calendar</field>
857             <field name="domain"></field>
858             <field name="context">{
859                     'search_default_picking_type_id': [active_id],
860                     'default_picking_type_id': active_id,
861                     'contact_display': 'partner_address',
862                     'search_default_backorder': 1,
863                     'search_default_confirmed': 1,
864             }
865             </field>
866             <field name="search_view_id" ref="view_picking_internal_search"/>
867         </record>
868
869         <record id="action_picking_tree" model="ir.actions.act_window">
870             <field name="name">Transfers</field>
871             <field name="res_model">stock.picking</field>
872             <field name="type">ir.actions.act_window</field>
873             <field name="view_type">form</field>
874             <field name="view_mode">tree,form,calendar</field>
875             <field name="domain"></field>
876             <field name="context">{
877                     'search_default_picking_type_id': [active_id],
878                     'default_picking_type_id': active_id,
879                     'contact_display': 'partner_address',
880             }
881             </field>
882             <field name="search_view_id" ref="view_picking_internal_search"/>
883             <field name="help" type="html">
884               <p class="oe_view_nocontent_create">
885                 Click to create a stock operation. 
886               </p><p>
887                 Most operations are prepared automatically by Odoo according
888                 to your preconfigured logistics rules, but you can also record
889                 manual stock movements.
890               </p>
891             </field>
892         </record>
893
894         <record id="view_move_graph" model="ir.ui.view">
895             <field name="name">stock.move.graph</field>
896             <field name="model">stock.move</field>
897             <field name="arch" type="xml">
898                 <graph string="Stock Moves Analysis" type="pivot">
899                     <field name="product_id" type="row"/>
900                     <field name="location_dest_id" groups="stock.group_locations" type="row"/>
901                     <field name="product_uom_qty" type="measure"/>
902                 </graph>
903             </field>
904         </record>
905
906         <record id="view_move_tree" model="ir.ui.view">
907             <field name="name">stock.move.tree</field>
908             <field name="model">stock.move</field>
909             <field eval="8" name="priority"/>
910             <field name="arch" type="xml">
911                 <tree colors="grey:state == 'cancel';red:(state not in ('cancel','done')) and date > current_date" string="Moves">
912                     <field name="name"/>
913                     <field name="picking_id" string="Reference"/>
914                     <field name="origin"/>
915                     <field name="picking_type_id"/>
916                     <field name="create_date" invisible="1" groups="base.group_no_one"/>
917                     <field name="product_id" on_change="onchange_product_id(product_id,location_id,location_dest_id, False)"/>
918                     <field name="product_uom_qty" on_change="onchange_quantity(product_id, product_uom_qty, product_uom, product_uos)"/>
919                     <field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
920                     <field name="product_uos" groups="product.group_uos"/>
921                     <button name="%(stock.move_scrap)d"
922                         string="Scrap Products" type="action"
923                         icon="terp-gtk-jump-to-ltr" context="{'scrap': True}"
924                         states="draft,waiting,confirmed,assigned"/>
925                     <field name="location_id" groups="stock.group_locations"/>
926                     <field name="location_dest_id" groups="stock.group_locations"/>
927                     <field name="date" groups="base.group_no_one"/>
928                     <field name="date_expected"/>
929                     <field name="state"/>
930                     <button name="action_done" states="confirmed,assigned" string="Process" type="object" icon="gtk-go-forward" help="Done"/>
931                 </tree>
932             </field>
933         </record>
934
935         <record id="view_move_picking_tree" model="ir.ui.view">
936             <field name="name">stock.move.tree</field>
937             <field name="model">stock.move</field>
938             <field eval="4" name="priority"/>
939             <field name="arch" type="xml">
940                 <tree colors="grey:scrapped == True" string="Stock Moves">
941                     <field name="product_id"/>
942                     <field name="product_uom_qty" on_change="onchange_quantity(product_id, product_uom_qty, product_uom, product_uos)"/>
943                     <field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
944                     <field name="product_uos" groups="product.group_uos"/>
945                     <field name="location_id" groups="stock.group_locations" invisible="1"/>
946                     <field name="picking_id" invisible="1" />
947                     <field name="create_date" invisible="1" />
948                     <field name="date_expected" invisible="1" />
949                     <button name="%(stock.move_scrap)d"
950                        string="Scrap Products" type="action"
951                        icon="terp-gtk-jump-to-ltr" context="{'scrap': True}"
952                        states="draft,waiting,confirmed,assigned"
953                        groups="base.group_user"/>
954                     <field name="scrapped" invisible="1"/>
955                     <field name="availability" invisible="1"/>
956                     <field name="reserved_availability" invisible="1"/>
957                     <field name="location_dest_id" groups="stock.group_locations"/>
958                     <field name="remaining_qty" invisible="1"/>
959                     <field name="string_availability_info"/>
960                     <field name="state"/>
961                 </tree>
962             </field>
963         </record>
964
965         <record id="view_move_form" model="ir.ui.view">
966             <field name="name">stock.move.form</field>
967             <field name="model">stock.move</field>
968             <field eval="1" name="priority"/>
969             <field name="arch" type="xml">
970                 <form string="Stock Moves">
971                 <header>
972                     <button name="action_confirm" states="draft" string="Process Later" type="object" class="oe_highlight"/>
973                     <button name="action_done" states="draft,assigned,confirmed" string="Process Entirely" type="object" class="oe_highlight"/>
974                     <button name="force_assign" states="confirmed" string="Set Available" type="object" class="oe_highlight"/>
975                     <button name="action_cancel" states="draft,assigned,confirmed" string="Cancel Move" type="object"/>
976                     <field name="state" widget="statusbar" statusbar_visible="draft,confirmed,assigned,done" statusbar_colors='{"waiting":"blue","confirmed":"blue"}'/>
977                 </header>
978                 <sheet>
979                     <group>
980                         <group name="main_grp" colspan="4">
981                             <group name="main_grp_col1">
982                                 <field name="product_id" on_change="onchange_product_id(product_id,location_id,location_dest_id, False)"/>
983                                 <label for="product_uom_qty"/>
984                                 <div>
985                                     <field name="product_uom_qty"
986                                         on_change="onchange_quantity(product_id, product_uom_qty, product_uom, product_uos)"
987                                         class="oe_inline"/>
988                                     <field name="product_uom" groups="product.group_uom" class="oe_inline"/>
989                                     <button name="%(stock.move_scrap)d"
990                                             string="Scrap" type="action"
991                                             icon="terp-gtk-jump-to-ltr" context="{'scrap': True}"
992                                             states="draft,waiting,confirmed,assigned" colspan="1"/>
993                                 </div>
994                                 <field name="name"/>
995                                 <label for="product_uos_qty" groups="product.group_uos"/>
996                                 <div groups="product.group_uos">
997                                     <field name="product_uos_qty"
998                                         on_change="onchange_uos_quantity(product_id, product_uos_qty, product_uos, product_uom)"
999                                         class="oe_inline"/>
1000                                     <field name="product_uos" class="oe_inline"/>
1001                                 </div>
1002                             </group>
1003                             <group name="main_grp_col2">
1004                                 <field name="picking_type_id"/>
1005                                 <field name="priority"/>
1006                                 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
1007                                 <field name="date_expected" on_change="onchange_date(date,date_expected)" attrs="{'invisible': [('state', '=', 'done')]}"/>
1008                                 <field name="date" attrs="{'invisible': [('state', '!=', 'done')]}"/>
1009                             </group>
1010                         </group>
1011                         <group name="origin_grp" string="Origin">
1012                             <field name="origin"/>
1013                             <field name="location_id" groups="stock.group_locations"/>
1014                             <field name="picking_id" domain="[('picking_type_id','=',picking_type_id)]"/>
1015                             <field name="create_date" groups="base.group_no_one"/>
1016                             <field name="procure_method" attrs="{'readonly': [('state', '!=', 'draft')]}" groups="stock.group_adv_location"/>
1017                             <field name="group_id"/>
1018                         </group>
1019                         <group name="destination_grp" string="Destination" groups="stock.group_locations">
1020                             <field name="location_dest_id" />
1021                             <field name="partner_id" context="{'contact_display':'partner'}" />
1022                         </group>
1023                         <group name="quants_grp" string="Reserved Quants" colspan="4" groups="base.group_no_one">
1024                             <field name="reserved_quant_ids"/>
1025                         </group>
1026                     </group>
1027                 </sheet>
1028                 </form>
1029             </field>
1030         </record>
1031
1032         <record id="view_move_picking_form" model="ir.ui.view">
1033             <field name="name">stock.move.form</field>
1034             <field name="model">stock.move</field>
1035             <field eval="20" name="priority"/>
1036             <field name="arch" type="xml">
1037                 <form string="Stock Moves">
1038                 <header>
1039                         <button name="force_assign" states="confirmed" string="Force Availability" type="object" groups="base.group_user"/>
1040                         <button name="action_confirm" states="draft" string="Confirm" type="object" groups="base.group_user"/>
1041                         <button name="do_unreserve" states="assigned" string="Cancel Availability" type="object" groups="base.group_user"/>
1042                         <field name="state" widget="statusbar" statusbar_visible="draft,assigned,done"/>
1043                 </header>
1044                 <group>
1045                     <group>
1046                         <field name="product_id" on_change="onchange_product_id(product_id,location_id,location_dest_id, parent.partner_id)"/>
1047                         <field name="procure_method" groups="stock.group_adv_location"/>
1048                         <field name="picking_type_id" invisible="1"/>
1049                         <label for="product_uom_qty"/>
1050                         <div>
1051                             <field name="product_uom_qty" on_change="onchange_quantity(product_id, product_uom_qty, product_uom, product_uos)" class="oe_inline"/>
1052                             <field name="product_uom" string="Unit Of Measure" groups="product.group_uom" class="oe_inline"/>
1053                             <button name="%(stock.move_scrap)d"
1054                                 string="Scrap" type="action"
1055                                 icon="terp-gtk-jump-to-ltr" context="{'scrap': True}"
1056                                 states="draft,waiting,confirmed,assigned"
1057                                 groups="base.group_user"/>
1058                         </div>
1059                         <label for="product_uos_qty" groups="product.group_uos"/>
1060                         <div groups="product.group_uos">
1061                             <field name="product_uos_qty" on_change="onchange_uos_quantity(product_id, product_uos_qty, product_uos, product_uom)" class="oe_inline"/>
1062                             <field name="product_uos" on_change="onchange_quantity(product_id, product_uom_qty, product_uom, product_uos)" class="oe_inline"/>
1063                         </div>
1064                         <field name="name"/>
1065                         <field name="product_packaging" groups="product.group_stock_packaging" domain="[('product_tmpl_id','=',product_id)]"/>
1066                     </group>
1067                     <group>
1068                         <field name="create_date" invisible="1"/>
1069                         <field name="date"/>
1070                         <field name="date_expected" on_change="onchange_date(date,date_expected)"/>
1071                     </group>
1072                     <group string="Locations" groups="stock.group_locations">
1073                         <field name="location_id" domain="[('usage','&lt;&gt;','view')]"/>
1074                         <field name="location_dest_id" domain="[('usage','=','internal')]"/>
1075                     </group>
1076                     <group name="quants_grp" string="Reserved Quants" colspan="4" groups="base.group_no_one">
1077                         <field name="reserved_quant_ids"/>
1078                     </group>
1079                 </group>
1080                 </form>
1081             </field>
1082         </record>
1083
1084         <record id="view_move_search" model="ir.ui.view">
1085             <field name="name">stock.move.search</field>
1086             <field name="model">stock.move</field>
1087             <field eval="3" name="priority"/>
1088             <field name="arch" type="xml">
1089                 <search string="Stock Moves">
1090                     <field name="origin" filter_domain="['|', '|', ('origin', 'ilike', self), ('name', 'ilike', self), ('picking_id', 'ilike', self)]" string="Reference"/>
1091                     <field name="date" groups="base.group_no_one"/>
1092
1093                     <filter icon="terp-camera_test" string="Ready" name="ready" domain="[('state','=','assigned')]" help="Stock moves that are Available (Ready to process)"/>
1094                     <filter icon="terp-stock" string="To Do" name="future" domain="[('state','in',('assigned','confirmed','waiting'))]" help="Stock moves that are Confirmed, Available or Waiting"/>
1095                     <filter icon="terp-dialog-close" string="Done" name="done" domain="[('state','=','done')]" help="Stock moves that have been processed"/>
1096                     <separator/>
1097                     <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"/>
1098                     <field name="product_id"/>
1099                     <field name="name" string="Location" filter_domain="['|',('location_id','ilike',self),('location_dest_id','ilike',self)]"/>
1100                     <field name="partner_id" string="Partner"  filter_domain="[('picking_id.partner_id','child_of',self)]"/>
1101                     <group expand="0" string="Group By">
1102                         <filter string="Product" name="by_product" icon="terp-accessories-archiver" domain="[]"  context="{'group_by':'product_id'}"/>
1103                         <filter string="Picking" name="groupby_picking_id" icon="terp-accessories-archiver" domain="[]"  context="{'group_by':'picking_id'}"/>
1104                         <filter string="Source" name="groupby_location_id" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'location_id'}" groups="stock.group_locations"/>
1105                         <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"/>
1106                         <filter icon="terp-stock_effects-object-colorize" string="Status" domain="[]" context="{'group_by':'state'}"/>
1107                         <filter string="Creation" name="groupby_create_date" icon="terp-go-month" domain="[]" context="{'group_by':'create_date'}" groups="base.group_no_one"/>
1108                         <filter string="Scheduled" name="groupby_date" icon="terp-go-month" domain="[]" context="{'group_by':'date_expected'}"/>
1109                     </group>
1110                 </search>
1111             </field>
1112         </record>
1113
1114         <record id="action_move_form2" model="ir.actions.act_window">
1115             <field name="name">Stock Moves</field>
1116             <field name="res_model">stock.move</field>
1117             <field name="type">ir.actions.act_window</field>
1118             <field name="view_type">form</field>
1119             <field name="view_id" ref="view_move_tree"/>
1120             <field name="search_view_id" ref="view_move_search"/>
1121             <field name="context">{}</field>
1122             <field name="help" type="html">
1123               <p class="oe_view_nocontent_create">
1124                 Click to create a stock movement.
1125               </p><p>
1126                 This menu gives you the full traceability of inventory
1127                 operations on a specific product. You can filter on the product
1128                 to see all the past or future movements for the product.
1129               </p>
1130             </field>
1131         </record>
1132         
1133         <record model="ir.actions.act_window.view" id="action_stock_move_tree_all">
1134             <field name="sequence" eval="1"/>
1135             <field name="view_mode">tree</field>
1136             <field name="view_id" ref="view_move_tree"/>
1137             <field name="act_window_id" ref="action_move_form2"/>
1138         </record>
1139
1140         <record model="ir.actions.act_window.view" id="action_stock_move_form_all">
1141             <field name="sequence" eval="3"/>
1142             <field name="view_mode">form</field>
1143             <field name="view_id" ref="view_move_form"/>
1144         <field name="act_window_id" ref="action_move_form2"/>
1145         </record>
1146
1147         <record model="ir.actions.act_window.view" id="action_stock_move_graph_all">
1148             <field name="sequence" eval="3"/>
1149             <field name="view_mode">graph</field>
1150             <field name="view_id" ref="view_move_graph"/>
1151         <field name="act_window_id" ref="action_move_form2"/>
1152         </record>
1153
1154         <menuitem action="action_move_form2" id="menu_action_move_form2" parent="menu_traceability" sequence="3" groups="stock.group_locations"/>
1155
1156         <!--
1157             Receipt Picking (By Stock Move)
1158             From stock_partial_move_view
1159         -->
1160         <record id="view_move_tree_receipt_picking" model="ir.ui.view">
1161             <field name="name">stock.move.tree2</field>
1162             <field name="model">stock.move</field>
1163             <field name="priority" eval="6"/>
1164             <field name="arch" type="xml">
1165                 <tree colors="grey:state == 'cancel'" string="Moves">
1166                     <field name="date" widget="date"/>
1167                     <field name="picking_id" string="Reference" invisible="1"/>
1168                     <field name="origin"/>
1169                     <field name="partner_id" string="Supplier"/>
1170                     <field name="product_id"/>
1171                     <field name="product_uom_qty"/>
1172                     <field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
1173                     <field name="location_id" invisible="1"/>
1174                     <field name="location_dest_id" invisible="1"/>
1175                     <field name="create_date" invisible="1"/>
1176                     <field name="date_expected" invisible="1"/>
1177                     <button name="%(stock.move_scrap)d"
1178                         string="Scrap Products" type="action"
1179                         icon="terp-gtk-jump-to-ltr" context="{'scrap': True}"
1180                         states="draft,waiting,confirmed,assigned"/>
1181                     <field name="state"/>
1182                     <button name="action_done" states="draft,assigned,confirmed"
1183                         icon="gtk-go-forward" type="object"
1184                         class="oe_highlight" help="Done"/>
1185                 </tree>
1186             </field>
1187         </record>
1188
1189         <!-- test -->
1190         <record id="view_move_tree_receipt_picking_board" model="ir.ui.view">
1191             <field name="name">stock.move.tree3</field>
1192             <field name="model">stock.move</field>
1193             <field eval="6" name="priority"/>
1194             <field name="arch" type="xml">
1195                 <tree string="Moves">
1196                     <field name="picking_id" string="Reference"/>
1197                     <field name="product_id"/>
1198                     <field name="product_uom_qty"/>
1199                     <field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
1200                     <field name="date" groups="base.group_no_one"/>
1201                 </tree>
1202             </field>
1203         </record>
1204
1205         <record id="action_receipt_picking_move" model="ir.actions.act_window">
1206             <field name="name">Incoming  Products</field>
1207             <field name="res_model">stock.move</field>
1208             <field name="type">ir.actions.act_window</field>
1209             <field name="view_type">form</field>
1210             <field name="view_mode">tree,form</field>
1211             <field name="domain" eval="[('picking_id.picking_type_id.code','=','incoming'), ('location_id.usage','!=','internal'), ('location_dest_id.usage', '=', 'internal')]"/>
1212             <field name="view_id" ref="view_move_tree_receipt_picking"/>
1213             <field name="context">{'product_receive': True, 'search_default_future': True}</field>
1214             <field name="help" type="html">
1215               <p class="oe_view_nocontent_create">
1216                 Click to register a product receipt. 
1217               </p><p>
1218                 Here you can receive individual products, no matter what
1219                 purchase order or picking order they come from. You will find
1220                 the list of all products you are waiting for. Once you receive
1221                 an order, you can filter based on the name of the supplier or
1222                 the purchase order reference. Then you can confirm all products
1223                 received using the buttons on the right of each line.
1224               </p>
1225             </field>
1226         </record>
1227
1228         <!-- Stock incoterms -->
1229         <record id="view_incoterms_tree" model="ir.ui.view">
1230             <field name="name">stock.incoterms.tree</field>
1231             <field name="model">stock.incoterms</field>
1232             <field name="arch" type="xml">
1233                 <tree string="Incoterms">
1234                     <field name="code"/>
1235                     <field colspan="4" name="name"/>
1236                 </tree>
1237             </field>
1238         </record>
1239         <record id="stock_incoterms_form" model="ir.ui.view">
1240             <field name="name">stock.incoterms.form</field>
1241             <field name="model">stock.incoterms</field>
1242             <field name="arch" type="xml">
1243                 <form string="Incoterms">
1244                     <sheet>
1245                         <field name="name"/>
1246                         <field name="code"/>
1247                         <field name="active"/>
1248                     </sheet>
1249                 </form>
1250             </field>
1251         </record>
1252         <record id="action_incoterms_tree" model="ir.actions.act_window">
1253             <field name="name">Incoterms</field>
1254             <field name="res_model">stock.incoterms</field>
1255             <field name="type">ir.actions.act_window</field>
1256             <field name="view_type">form</field>
1257             <field name="view_mode">tree,form</field>
1258         </record>
1259
1260         <menuitem action="action_incoterms_tree" id="menu_action_incoterm_open" parent="menu_warehouse_config" sequence="1"/>
1261
1262
1263          <record id="view_pickingtype_filter" model="ir.ui.view">
1264             <field name="name">stock.picking.type.filter</field>
1265             <field name="model">stock.picking.type</field>
1266             <field name="arch" type="xml">
1267                 <search string="Picking Type">
1268                     <field name="name"/>
1269                     <field name="sequence_id"/>
1270                     <field name="warehouse_id"/>
1271                 </search>
1272             </field>
1273         </record>
1274         <record model="ir.ui.view" id="view_picking_type_tree">
1275             <field name="name">Picking types</field>
1276             <field name="model">stock.picking.type</field>
1277             <field name="arch" type="xml">
1278                 <tree string="Picking Types">
1279                     <field name="sequence" widget="handle"/>
1280                     <field name="name"/>
1281                     <field name="warehouse_id"/>
1282                     <field name="sequence_id"/>
1283                 </tree>
1284             </field>
1285         </record>
1286         <record model="ir.ui.view" id="view_picking_type_form">
1287             <field name="name">Picking Types</field>
1288             <field name="model">stock.picking.type</field>
1289             <field name="arch" type="xml">
1290                 <form string="Picking Types">
1291                     <sheet>
1292                         <group>
1293                             <group>
1294                                 <field name="name"/>
1295                                 <field name="sequence_id"/>
1296                                 <field name="warehouse_id"/>
1297                             </group>
1298                             <group>
1299                                 <field name="code" on_change="onchange_picking_code(code)"/>
1300                                 <field name="return_picking_type_id"/>
1301                             </group>
1302                         </group>
1303                         <separator string="Locations"/>
1304                         <group>
1305                             <field name="default_location_src_id" attrs="{'required': [('code', '=', 'internal')]}"/>
1306                             <field name="default_location_dest_id" attrs="{'required': [('code', 'in', ('internal', 'incoming'))]}"/>
1307                         </group>
1308                     </sheet>
1309                 </form>
1310             </field>
1311         </record>
1312
1313
1314         <record id="stock_picking_type_kanban" model="ir.ui.view">
1315             <field name="name">stock.picking.type.kanban</field>
1316             <field name="model">stock.picking.type</field>
1317             <field name="arch" type="xml">
1318                 <kanban class="oe_background_grey" create="0">
1319                     <field name="complete_name"/>
1320                     <field name="color"/>
1321                     <field name="count_picking_ready"/>
1322                     <field name="count_picking_draft"/>
1323                     <field name="count_picking_waiting"/>
1324                     <field name="count_picking_late"/>
1325                     <field name="count_picking_backorders"/>
1326                     <templates>
1327                         <t t-name="kanban-box">
1328                             <div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_stock_picking_type">
1329                                 <div class="oe_dropdown_toggle oe_dropdown_kanban" groups="stock.group_stock_manager">
1330                                     <span class="oe_e">í</span>
1331                                     <ul class="oe_dropdown_menu">
1332                                         <t t-if="widget.view.is_action_enabled('edit')"><li><a type="edit">Edit...</a></li></t>
1333                                         <t t-if="widget.view.is_action_enabled('delete')"><li><a type="delete">Delete</a></li></t>
1334                                         <t t-if="widget.view.is_action_enabled('edit')"><li><ul class="oe_kanban_colorpicker" data-field="color"/></li></t>
1335                                     </ul>
1336                                 </div>
1337                                 <div class="oe_kanban_content">
1338                                     <h4 class="text-center"><strong><field name="complete_name"/></strong></h4>
1339                                     <div class="oe_right">
1340                                         <a name="open_barcode_interface" type="object">
1341                                             <img src="/stock/static/src/img/scan.png" 
1342                                                 alt="Click to launch the barcode interface"
1343                                                 class="oe_stock_scan_image" title="Click to launch the barcode interface"/>
1344                                         </a>
1345                                     </div>
1346                                     <div class="oe_items_list oe_kanban_ellipsis">
1347                                         <div>
1348                                             <a name="%(action_picking_tree_ready)d" type="action">
1349                                                 <field name="count_picking_ready"/> Ready
1350                                             </a>
1351                                             <a name="%(action_picking_tree_done)d" type="action" class="oe_sparkline_bar_link">
1352                                                 <field name="last_done_picking" widget="sparkline_bar" options="{'type': 'tristate', 'colorMap': {'0': 'orange', '-1': 'red', '1': 'green'}}">Last 10 Done Operations</field>
1353                                             </a>
1354                                         </div>
1355                                         <div t-if="record.count_picking_waiting.raw_value &gt; 0">
1356                                             <a name="%(action_picking_tree_waiting)d" type="action">
1357                                                 <field name="count_picking_waiting"/> Waiting Availability
1358                                             </a>
1359                                         </div>
1360                                         <div>
1361                                             <a name="%(action_picking_tree)d" type="action">All Operations</a>
1362                                         </div>
1363                                     </div>
1364                                     <div class="oe_picking_type_gauge">
1365                                         <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>
1366                                         <field name="rate_picking_backorders" widget="gauge" style="width:150px; height: 110px;">Backorders (%%)</field>
1367                                         <div class="oe_gauge_labels">
1368                                             <div class="oe_gauge_label_column">
1369                                                 <a name="%(action_picking_tree_late)d" type="action">
1370                                                     <field name="count_picking_late"/> Late
1371                                                 </a>
1372                                             </div>
1373                                             <div class="oe_gauge_label_column">
1374                                                 <a name="%(action_picking_tree_backorder)d" type="action">
1375                                                     <field name="count_picking_backorders"/> Backorders
1376                                                 </a>
1377                                             </div>
1378                                         </div>
1379                                     </div>
1380
1381                                 </div>
1382                             </div>
1383                         </t>
1384                     </templates>
1385                 </kanban>
1386             </field>
1387         </record>
1388
1389         <record id="action_picking_type_form" model="ir.actions.act_window">
1390             <field name="name">All Operations</field>
1391             <field name="res_model">stock.picking.type</field>
1392             <field name="type">ir.actions.act_window</field>
1393             <field name="view_type">form</field>
1394             <field name="view_mode">kanban,form</field>
1395             <field name="help" type="html">
1396               <p class="oe_view_nocontent_create">
1397                 Click to create a new picking type. 
1398               </p><p>
1399                 The picking type system allows you to assign each stock
1400                 operation a specific type which will alter its views accordingly.  
1401                 On the picking type you could e.g. specify if packing is needed by default, 
1402                 if it should show the customer.  
1403               </p>
1404             </field>
1405         </record>
1406         
1407         <record id="action_picking_type_list" model="ir.actions.act_window">
1408             <field name="name">All Operations</field>
1409             <field name="res_model">stock.picking.type</field>
1410             <field name="type">ir.actions.act_window</field>
1411             <field name="view_type">form</field>
1412             <field name="view_mode">list,form</field>            
1413         </record>
1414
1415         <menuitem
1416             action="action_picking_type_form"
1417             id="menu_action_picking_type_form"
1418             parent="menu_stock_warehouse_mgmt" sequence="1"/>
1419
1420         <menuitem 
1421             id="menu_pickingtype" 
1422             name="Types of Operation" 
1423             parent="stock.menu_stock_configuration" 
1424             action="action_picking_type_list" />
1425         
1426
1427         <!-- Order Point -->
1428         <record id="view_warehouse_orderpoint_tree" model="ir.ui.view">
1429             <field name="name">stock.warehouse.orderpoint.tree</field>
1430             <field name="model">stock.warehouse.orderpoint</field>
1431             <field name="arch" type="xml">
1432                 <tree string="Reordering Rules">
1433                     <field name="name"/>
1434                     <field name="warehouse_id" groups="stock.group_locations"/>
1435                     <field name="location_id" groups="stock.group_locations"/>
1436                     <field name="product_id"/>
1437                     <field name="product_uom" groups="product.group_uom"/>
1438                     <field name="product_min_qty"/>
1439                     <field name="product_max_qty"/>
1440                 </tree>
1441             </field>
1442         </record>
1443
1444         <record model="ir.ui.view" id="warehouse_orderpoint_search">
1445             <field name="name">stock.warehouse.orderpoint.search</field>
1446             <field name="model">stock.warehouse.orderpoint</field>
1447             <field name="arch" type="xml">
1448                 <search string="Reordering Rules Search">
1449                     <field name="name" string="Reordering Rules"/>
1450                     <field name="warehouse_id"/>
1451                     <field name="location_id" groups="stock.group_locations"/>
1452                     <field name="company_id" groups="base.group_multi_company"/>
1453                     <field name="product_id"/>
1454                     <group expand="0" string="Group By">
1455                         <filter string="Warehouse" icon="terp-go-home" domain="[]"  context="{'group_by':'warehouse_id'}"/>
1456                         <filter string="Location" icon="terp-go-home" domain="[]" context="{'group_by':'location_id'}"/>
1457                     </group>
1458                 </search>
1459             </field>
1460         </record>
1461
1462         <record id="view_warehouse_orderpoint_form" model="ir.ui.view">
1463             <field name="name">stock.warehouse.orderpoint.form</field>
1464             <field name="model">stock.warehouse.orderpoint</field>
1465             <field name="arch" type="xml">
1466                 <form string="Reordering Rules">
1467                     <sheet>
1468                         <div class="oe_right oe_button_box">
1469                             <button name="action_view_proc_to_process" type="object" string="Procurement Orders to Process"/>                            
1470                         </div>
1471                         <group>
1472                             <group>
1473                                 <field name="name" />
1474                                 <field name="product_id" on_change="onchange_product_id(product_id)"/>
1475                             </group>
1476                             <group>
1477                                 <field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)" widget="selection" groups="stock.group_locations"/>
1478                                 <field name="product_uom" groups="product.group_uom"/>
1479                                 <field name="location_id" groups="stock.group_locations"/>
1480                                 <field name="group_id" groups="stock.group_adv_location"/>
1481                                 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
1482                             </group>
1483                         </group>
1484                         <group>
1485                             <group string="Rules">
1486                                 <field name="product_min_qty" />
1487                                 <field name="product_max_qty" />
1488                                 <field name="qty_multiple" string="Quantity Multiple"/>
1489                             </group>
1490                             <group string="Misc">
1491                                 <field name="active" />
1492                             </group>
1493                         </group>                        
1494                     </sheet>
1495                 </form>
1496             </field>
1497         </record>
1498
1499         <record id="action_orderpoint_form" model="ir.actions.act_window">
1500             <field name="name">Reordering Rules</field>
1501             <field name="res_model">stock.warehouse.orderpoint</field>
1502             <field name="type">ir.actions.act_window</field>
1503             <field name="view_type">form</field>
1504             <field name="view_id" ref="view_warehouse_orderpoint_tree"/>
1505             <field name="search_view_id" ref="warehouse_orderpoint_search" />
1506             <field name="help" type="html">
1507               <p class="oe_view_nocontent_create">
1508                 Click to add a reordering rule.
1509               </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>
1510             </field>
1511         </record>
1512
1513         <act_window
1514             context="{'search_default_warehouse_id': active_id, 'default_warehouse_id': active_id}"
1515             id="act_stock_warehouse_2_stock_warehouse_orderpoint"
1516             name="Reordering Rules"
1517             res_model="stock.warehouse.orderpoint"
1518             src_model="stock.warehouse"
1519             groups="stock.group_stock_user"/>
1520
1521         <!-- Procurements -->
1522
1523         <record id="view_procurement_form_stock_inherit" model="ir.ui.view">
1524             <field name="name">procurement.order.form.stock.inherit</field>
1525             <field name="model">procurement.order</field>
1526             <field name="inherit_id" ref="procurement.procurement_form_view"/>
1527             <field name="arch" type="xml">
1528                 <xpath expr="//group[@name='scheduling']" position="before">
1529                     <group>
1530                         <field name="warehouse_id" on_change="change_warehouse_id(warehouse_id, context)"/>
1531                         <field name="location_id" domain="[('usage', '=', 'internal')]"/>
1532                         <field name="route_ids" widget="many2many_tags"/>
1533                     </group>
1534                 </xpath>
1535                 <xpath expr="//div[@name='button_box']" position="inside">
1536                     <button name="do_view_pickings" string="Group's Pickings" type="object"/>
1537                 </xpath>
1538                 <xpath expr="//field[@name='rule_id']" position="replace">
1539                     <field name="rule_id" domain="['|', ('location_id', '=', False), ('location_id', '=', location_id)]"/>
1540                     <field name="partner_dest_id"/>
1541                 </xpath>
1542             </field>
1543         </record>
1544         <record id="view_procurement_tree_stock_inherit" model="ir.ui.view">
1545             <field name="name">procurement.order.tree.stock.inherit</field>
1546             <field name="model">procurement.order</field>
1547             <field name="inherit_id" ref="procurement.procurement_tree_view"/>
1548             <field name="arch" type="xml">
1549                 <xpath expr="//field[@name='origin']" position="before">
1550                     <field name="location_id"/>
1551                 </xpath>
1552             </field>
1553         </record>
1554         <record id="view_procurement_rule_tree_stock_inherit" model="ir.ui.view">
1555             <field name="name">procurement.rule.tree.stock.inherit</field>
1556             <field name="model">procurement.rule</field>
1557             <field name="inherit_id" ref="procurement.view_procurement_rule_tree"/>
1558             <field name="arch" type="xml">
1559                 <xpath expr="//field[@name='action']" position="after">
1560                     <field name="picking_type_id"/>
1561                 </xpath>
1562             </field>
1563         </record>
1564
1565         <record id="view_procurement_rule_form_stock_inherit" model="ir.ui.view">
1566             <field name="name">procurement.rule.form.stock.inherit</field>
1567             <field name="model">procurement.rule</field>
1568             <field name="inherit_id" ref="procurement.view_procurement_rule_form"/>
1569             <field name="arch" type="xml">
1570                 <xpath expr="//field[@name='action']" position="before">
1571                     <field name="location_id"/>
1572                     <field name="warehouse_id" groups="base.group_no_one"/>
1573                     <field name="route_id" groups="base.group_no_one"/>
1574                 </xpath>
1575                 <xpath expr="//field[@name='action']" position="after">
1576                     <field name="picking_type_id" attrs="{'required': [('action', '!=', 'manufacture')]}"/>
1577                 </xpath>
1578                 <xpath expr="//field[@name='group_id']" position="after">
1579                     <field name="propagate"/>
1580                     <field name="propagate_warehouse_id"/>
1581                 </xpath>
1582                 <xpath expr="//group[@name='propagation_group']" position="before">
1583                     <group attrs="{'invisible': [('action', '!=', 'move')]}" string="Moving Options">
1584                         <field name="procure_method" groups="stock.group_adv_location"/>
1585                         <field name="location_src_id" attrs="{'required': [('action', '=', 'move')]}"/>
1586                         <field name="partner_address_id" groups="stock.group_adv_location" context="{'show_address': 1}" options="{'always_reload': 1}"/>
1587                         <label for="delay" string="Delay"  groups="stock.group_adv_location"/>
1588                         <div groups="stock.group_adv_location">
1589                            <field name="delay" class="oe_inline"/>days
1590                         </div>
1591                     </group>
1592                 </xpath>
1593             </field>
1594         </record>
1595         
1596         <record model="ir.actions.act_window" id="procrules">
1597             <field name="context">{}</field>
1598             <field name="name">Pull Rules</field>
1599             <field name="res_model">procurement.rule</field>
1600         </record>
1601         
1602         <record id="quant_search_view" model="ir.ui.view">
1603             <field name="name">stock.quant.search</field>
1604             <field name="model">stock.quant</field>
1605             <field eval="10" name="priority"/>
1606             <field name="arch" type="xml">
1607                 <search string="Quants">
1608                     <field name="product_id"/>
1609                     <field name="location_id"/>
1610                     <field name="package_id" groups="stock.group_tracking_lot"/>
1611                     <field name="lot_id" groups="stock.group_production_lot"/>
1612                     <field name="owner_id" groups="stock.group_tracking_owner"/>
1613                     <group expand='0' string='Filters'>
1614                         <filter name='internal_loc' string="Internal Locations" domain="[('location_id.usage','=', 'internal')]"/>
1615                     </group>
1616                     <group expand='0' string='Group by...'>
1617                        <filter name="productgroup" string='Product' context="{'group_by' : 'product_id'}"/>
1618                        <filter string='Owner' context="{'group_by' : 'owner_id'}" groups="stock.group_tracking_owner"/>
1619                        <filter string='Lot' context="{'group_by' : 'lot_id'}" groups="stock.group_production_lot"/>
1620                        <filter name="locationgroup" string='Location' icon="terp-stock_symbol-selection" domain="[]" context="{'group_by' : 'location_id'}"/>
1621                        <filter string='Package' icon="terp-stock_symbol-selection" domain="[]" context="{'group_by' : 'package_id'}" groups="stock.group_tracking_lot"/>
1622                        <filter string='Packaging' icon="terp-stock_symbol-selection" domain="[]" context="{'group_by' : 'packaging_type_id'}" groups="stock.group_tracking_lot"/>
1623                        <filter string='Company' icon="terp-go-home" domain="[]" context="{'group_by' : 'company_id'}" groups="base.group_multi_company"/>
1624                    </group>
1625                 </search>
1626             </field>
1627         </record>
1628         
1629         <record model="ir.actions.act_window" id="quantsact">
1630             <field name="name">Quants</field>
1631             <field name="res_model">stock.quant</field>
1632             <field name="view_type">form</field>
1633             <field name="view_mode">tree,form,graph</field>
1634             <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>
1635         </record>
1636
1637         <record model="ir.ui.view" id="view_stock_quant_form">
1638             <field name="name">stock.quant.form</field>
1639             <field name="model">stock.quant</field>
1640             <field eval="10" name="priority"/>
1641             <field name="arch" type="xml">
1642                 <form string="Quants">
1643                     <div class="oe_right oe_button_box">
1644                         <button name="action_view_quant_history" type="object" string="Quant History"/>                            
1645                     </div>
1646                     <group>
1647                         <field name="product_id"/>
1648                         <field name="qty"/>
1649                         <field name="lot_id" groups="stock.group_production_lot"/>
1650                         <field name="package_id" groups="stock.group_tracking_lot"/>
1651                         <field name="location_id"/>
1652                         <field name="in_date"/>
1653                         <field name="reservation_id"/>
1654                         <field name="propagated_from_id"/>
1655                         <field name="owner_id" groups="stock.group_tracking_owner"/>
1656                         <field name="inventory_value"/>
1657                     </group>
1658                 </form>
1659             </field>
1660         </record>
1661
1662
1663         <record model="ir.ui.view" id="view_stock_quant_tree">
1664             <field name="name">stock.quant.tree</field>
1665             <field name="model">stock.quant</field>
1666             <field eval="10" name="priority"/>
1667             <field name="arch" type="xml">
1668                 <tree string="Quants" create="0">
1669                     <field name="product_id"/>
1670                     <field name="qty"/>
1671                     <field name="location_id"/>
1672                     <field name="owner_id" groups="stock.group_tracking_owner"/>
1673                     <field name="lot_id" groups="stock.group_production_lot"/>
1674                     <field name="package_id" groups="stock.group_tracking_lot"/>
1675                     <field name="packaging_type_id" invisible="1"/>
1676                     <field name="in_date"/>
1677                     <field name="inventory_value"/>
1678                     <field name="reservation_id" invisible='1'/>
1679                     <field name="propagated_from_id" invisible='1'/>
1680                     <field name='company_id' groups="base.group_multi_company"/>
1681                 </tree>
1682             </field>
1683         </record>
1684
1685        <record model="ir.ui.view" id="view_stock_quant_graph_value">
1686             <field name="name">stock.quant.graph</field>
1687             <field name="model">stock.quant</field>
1688             <field eval="12" name="priority"/>
1689             <field name="arch" type="xml">
1690                 <graph string="Quants">
1691                     <field name="product_id"/>
1692                     <field name="qty"/>
1693                     <field name="location_id"/>
1694                 </graph>
1695             </field>
1696         </record>
1697
1698         <!-- Procurements are located in Warehouse menu hierarchy, MRP users should come to Stock application to use it.  -->
1699         <menuitem id="menu_stock_sched" name="Schedulers" parent="stock.menu_stock_root" sequence="4" groups="stock.group_stock_manager"/>
1700         <menuitem action="action_procurement_compute" id="menu_procurement_compute" parent="menu_stock_sched" groups="base.group_no_one"/>
1701         <menuitem action="procurement.action_compute_schedulers" id="menu_stock_proc_schedulers" parent="menu_stock_sched" sequence="20" groups="stock.group_stock_manager"/>
1702         <menuitem action="procurement.procurement_exceptions" id="menu_stock_procurement_action" parent="menu_stock_sched" sequence="50" groups="stock.group_stock_manager"/>
1703         <menuitem id="menu_stock_procurement" name="Automatic Procurements" parent="stock.menu_stock_configuration" sequence="5"/>
1704         <menuitem action="action_orderpoint_form" id="menu_stock_order_points" parent="stock.menu_stock_configuration" sequence="10"/>
1705         <menuitem id="stock.next_id_61" name="Warehouse" sequence="15" parent="base.menu_reporting" groups="group_stock_manager"/>
1706         <menuitem id="menu_quants" name="Quants" parent="menu_traceability" sequence="20" action="quantsact" groups="base.group_no_one"/>
1707         <menuitem id="menu_procurement_rules" name="Procurement Rules" parent="stock.menu_stock_configuration" action="procrules" groups="base.group_no_one"/>
1708         <menuitem id="menu_pickingtype" name="Types of Operation" parent="stock.menu_stock_configuration" action="action_picking_type_list"/>
1709
1710
1711         <record model="ir.actions.act_window" id="product_open_orderpoint">
1712             <field name="context">{'default_product_id': active_id, 'search_default_product_id': active_id}</field>
1713             <field name="name">Reordering Rules</field>
1714             <field name="res_model">stock.warehouse.orderpoint</field>
1715         </record>
1716         
1717         <record model="ir.actions.act_window" id="product_open_quants">
1718             <field name="context">{'search_default_internal_loc': 1, 'search_default_product_id': active_id, 'search_default_locationgroup':1}</field>
1719             <field name="name">Current Stock</field>
1720             <field name="res_model">stock.quant</field>
1721         </record>
1722         
1723         <record model="ir.ui.view" id="view_quant_package_form">
1724             <field name="name">stock.quant.package.form</field>
1725             <field name="model">stock.quant.package</field>
1726             <field eval="10" name="priority"/>
1727             <field name="arch" type="xml">
1728                 <form string="Package">
1729                     <sheet>
1730                         <div class="oe_right oe_button_box">
1731                             <button name="unpack" string="Unpack" type="object"/>
1732                         </div>
1733                         <div class="oe_title">
1734                             <label for="name" string="Package Reference" class="oe_edit_only"/>
1735                             <h1><field name="name" class="oe_inline"/></h1>
1736                         </div>
1737                         <group>
1738                             <group>
1739                                <field name="ul_id"/>
1740                                <field name="packaging_id"/>
1741                                <field name='company_id' groups="base.group_multi_company"/>
1742                                <field name='owner_id' groups="stock.group_tracking_owner"/>
1743                             </group>
1744                             <group>
1745                             <field name="location_id"/>
1746                             <field name="parent_id"/>
1747                             </group>
1748                         </group>
1749                         <notebook>
1750                             <page string="Content">
1751                                 <separator string="Bulk Content" />
1752                                 <field name="quant_ids">
1753                                     <tree string="Quants">
1754                                         <field name="product_id"/>
1755                                         <field name="qty"/>
1756                                         <field name="location_id"/>
1757                                         <field name="in_date"/>
1758                                     </tree>
1759                                 </field>
1760
1761                                 <div class="oe_right oe_button_box" style="margin-top: 10px">
1762                                     <button name="get_content_package" type="object" string="View Contained Packages content" icon="gtk-execute" attrs="{'invisible': [('children_ids','=',[])]}"/>
1763                                 </div>
1764                                 <separator string="Contained Packages"/>
1765                                 <field name="children_ids">
1766                                     <tree string="Contained Packages">
1767                                         <field name="complete_name"/>
1768                                         <field name="ul_id"/>
1769                                         <field name="packaging_id"/>
1770                                         <field name="location_id"/>
1771                                     </tree>
1772                                 </field>
1773                             </page>
1774                         </notebook> 
1775                     </sheet>
1776                 </form>
1777             </field>
1778         </record>
1779         
1780         
1781         <record model="ir.ui.view" id="view_quant_package_tree">
1782             <field name="name">stock.quant.package.tree</field>
1783             <field name="model">stock.quant.package</field>
1784             <field eval="10" name="priority"/>
1785             <field name="arch" type="xml">
1786                 <tree string="Package">
1787                     <field name="complete_name"/>
1788                     <field name="ul_id"/>
1789                     <field name="packaging_id"/>
1790                     <field name="location_id"/>
1791                     <field name="company_id"/>
1792                 </tree>
1793             </field>
1794         </record>
1795         <record id="quant_package_search_view" model="ir.ui.view">
1796             <field name="name">stock.quant.package.search</field>
1797             <field name="model">stock.quant.package</field>
1798             <field eval="10" name="priority"/>
1799             <field name="arch" type="xml">
1800                 <search string="Package">
1801                     <field name="name" string="Package Name"/>
1802                     <field name="location_id"/>
1803                     <field name="ul_id"/>
1804                     <field name="packaging_id"/>
1805                     <group  expand='0' string='Group by...'>
1806                        <filter string='Location' icon="terp-stock_symbol-selection" domain="[]" context="{'group_by' : 'location_id'}"/>
1807                        <filter string='Packaging' icon="terp-stock_symbol-selection" domain="[]" context="{'group_by' : 'packaging_id'}"/>
1808                        <filter string='Company' icon="terp-go-home" domain="[]" context="{'group_by' : 'company_id'}" groups="base.group_multi_company"/>
1809                    </group>
1810                 </search>
1811             </field>
1812         </record>
1813         <record model="ir.actions.act_window" id="action_package_view">
1814             <field name="context">{}</field>
1815             <field name="name">Packages</field>
1816             <field name="res_model">stock.quant.package</field>
1817             <field name="help" type="html">
1818                 <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.
1819                 </p>
1820             </field>
1821         </record>
1822         <menuitem id="menu_package" name="Packages" parent="menu_stock_product" action="action_package_view" groups="stock.group_tracking_lot"/>
1823         
1824         
1825         <!--Routes-->
1826         <record id="stock_location_route_tree" model="ir.ui.view">
1827             <field name="name">stock.location.route.tree</field>
1828             <field name="model">stock.location.route</field>
1829             <field name="arch" type="xml">
1830                 <tree string="Routes">
1831                     <field name="sequence" widget="handle" />
1832                     <field name="name"/>
1833                 </tree>
1834             </field>
1835         </record>
1836
1837         <record id="stock_location_route_form_view" model="ir.ui.view">
1838             <field name="name">stock.location.route.form</field>
1839             <field name="model">stock.location.route</field>
1840             <field eval="7" name="priority" />
1841             <field name="arch" type="xml">
1842                 <form string="Route">
1843                     <sheet>
1844                         <div class="oe_title">
1845                             <label for="name" class="oe_edit_only"/>
1846                             <h1><field name="name"/></h1>
1847                         </div>
1848                     <group>
1849                         <group>
1850                             <field name="company_id" groups="base.group_multi_company" widget="selection"/>
1851                             <field name="active" groups="stock.group_adv_location" />
1852                         </group>
1853                         <group>
1854                             <field name="sequence" string="Sequence" groups="base.group_no_one"/>
1855                         </group>
1856                     </group>
1857                     <separator string="Applicable On"/>
1858                     <p class="oe_grey">Select the places where this route can be selected</p>
1859                     <group>
1860                         <group>
1861                             <field name="product_categ_selectable" string="Product Categories"/>
1862                             <field name="product_selectable" string="Products"/>
1863                         </group>
1864                         <group>
1865                             <field name="warehouse_selectable" string="Warehouses"/>
1866                         </group>
1867                     </group>
1868                     <group string="Push Rules" colspan="4" >
1869                         <field name="push_ids" colspan="4" nolabel="1"/>
1870                     </group>
1871                     <group string="Pull Rules" colspan="4" >
1872                         <field name="pull_ids" colspan="4" nolabel="1"/>
1873                     </group>
1874                     </sheet>
1875                 </form>
1876             </field>
1877         </record>
1878         
1879         <record id="action_routes_form" model="ir.actions.act_window">
1880             <field name="name">Routes</field>
1881             <field name="res_model">stock.location.route</field>
1882             <field name="type">ir.actions.act_window</field>
1883             <field name="view_type">form</field>
1884             <field name="view_mode">tree,form</field>
1885             <field name="view_id" ref="stock_location_route_tree" />
1886             <field name="help" type="html">
1887                 <p class="oe_view_nocontent_create">
1888                     Click to add a route.
1889               </p>
1890                 <p>You can define here the main routes that run through
1891                     your warehouses and that define the flows of your products. These
1892                     routes can be assigned to a product, a product category or be fixed
1893                     on procurement or sales order. </p>
1894             </field>
1895         </record>
1896         
1897         <menuitem action="action_routes_form" id="menu_stock_routes"
1898             parent="stock.menu_stock_configuration" sequence="11" />
1899
1900         <record id="do_view_pickings" model="ir.actions.act_window">
1901             <field name="name">Pickings for Groups</field>
1902             <field name="res_model">stock.picking</field>
1903             <field name="view_type">form</field>
1904             <field name="view_mode">tree,form</field>
1905         <field name="domain">[('group_id','=',active_id)]</field>
1906         </record>
1907         <record id="procurement_group_form_view_herited" model="ir.ui.view">
1908             <field name="name">procurement.group.form.herited</field>
1909             <field name="model">procurement.group</field>
1910             <field name="inherit_id" ref="procurement.procurement_group_form_view"/>
1911             <field name="arch" type="xml">
1912                 <xpath expr="//div[@name='button_box']" position="inside">
1913                     <button name="%(do_view_pickings)d" string="Pickings" type="action"/>
1914                 </xpath>        
1915             </field>
1916         </record>
1917         
1918     </data>
1919 </openerp>