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