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