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