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