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