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