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