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