[IMP] views
[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="Receive/Deliver By Orders" parent="menu_stock_root" sequence="1"/>
12         <menuitem id="menu_stock_products_moves" name="Receive/Deliver Products" parent="menu_stock_root" sequence="2"/>
13         <menuitem id="menu_stock_product" name="Products" parent="menu_stock_root" sequence="6"/>
14         <menuitem name="Products by Category" id="menu_product_by_category_stock_form" action="product.product_category_action"
15             parent="stock.menu_stock_product" sequence="0"/>
16         <menuitem action="product.product_normal_action" id="menu_stock_products_menu" parent="menu_stock_product" sequence="1"/>
17         <menuitem id="menu_stock_configuration" name="Configuration" parent="menu_stock_root" sequence="15" groups="group_stock_manager"/>
18         <menuitem id="menu_warehouse_config" name="Warehouse Management" parent="menu_stock_configuration" sequence="40" groups="base.group_no_one"/>
19         <menuitem id="menu_stock_inventory_control" name="Inventory Control" parent="menu_stock_root" sequence="4"/>
20         <menuitem
21             id="menu_product_in_config_stock" name="Products"
22             parent="stock.menu_stock_configuration" sequence="45" groups="base.group_no_one"/>
23         <menuitem
24             action="product.product_category_action_form" id="menu_product_category_config_stock"
25             parent="stock.menu_product_in_config_stock" sequence="0"/>
26         <menuitem
27             action="product.product_variant_action" id="menu_product_variant_config_stock"
28             parent="stock.menu_product_in_config_stock" groups="product.group_product_variant" sequence="2"/>
29         <menuitem
30             action="product.product_template_action" id="menu_product_template_config_stock"
31             parent="stock.menu_product_in_config_stock" groups="product.group_product_variant" sequence="1"/>
32         <menuitem
33             action="product.product_ul_form_action" groups="product.group_stock_packaging"
34             id="menu_product_packaging_stock_action" parent="stock.menu_product_in_config_stock" sequence="3"/>
35         <menuitem
36             id="menu_stock_unit_measure_stock" name="Units of Measure"
37             parent="stock.menu_product_in_config_stock"  sequence="35" groups="product.group_uom"/>
38         <menuitem
39             action="product.product_uom_categ_form_action" id="menu_stock_uom_categ_form_action"
40             parent="menu_stock_configuration" sequence="30" groups="product.group_uom"/>
41         <menuitem
42             action="product.product_uom_form_action" id="menu_stock_uom_form_action"
43             parent="menu_stock_configuration" sequence="35" groups="product.group_uom"/>
44
45         <record id="stock_inventory_line_tree" model="ir.ui.view">
46             <field name="name">stock.inventory.line.tree</field>
47             <field name="model">stock.inventory.line</field>
48             <field name="arch" type="xml">
49                 <tree string="Stock Inventory Lines">
50                     <field name="product_id"/>
51                     <field name="product_qty"/>
52                     <field name="product_uom" groups="product.group_uom"/>
53                     <field name="prod_lot_id" groups="stock.group_production_lot"/>
54                     <button name="%(stock.action_view_stock_inventory_line_split)d"
55                             string="Split inventory lines" groups="stock.group_inventory_valuation"
56                             type="action" icon="gtk-justify-fill"/>
57                     <field name="location_id" groups="stock.group_locations"/>
58                 </tree>
59             </field>
60         </record>
61         <record id="view_inventory_line_form" model="ir.ui.view">
62             <field name="name">stock.inventory.line.form</field>
63             <field name="model">stock.inventory.line</field>
64             <field name="arch" type="xml">
65                 <form string="Stock Inventory Lines" version="7.0">
66                     <group col="4">
67                         <field context="{'location':location_id, 'uom':product_uom, 'to_date':parent.date}" name="product_id" on_change="on_change_product_id(location_id,product_id,product_uom,parent.date)" domain="[('type','&lt;&gt;','service')]"/>
68                         <field name="product_qty"/>
69                         <field name="product_uom" groups="product.group_uom"/>
70                         <field name="prod_lot_id" groups="stock.group_production_lot"/>
71                         <field domain="[('usage','=','internal')]" name="location_id"/>
72                         <button name="%(stock.action_view_stock_inventory_line_split)d"
73                             string="Split Inventory Line" groups="stock.group_inventory_valuation"
74                             type="action" icon="gtk-justify-fill"/>
75                     </group>
76                 </form>
77             </field>
78         </record>
79
80          <record id="view_inventory_filter" model="ir.ui.view">
81             <field name="name">stock.inventory.filter</field>
82             <field name="model">stock.inventory</field>
83             <field name="arch" type="xml">
84                 <search string="Search Inventory">
85                     <field name="name" string="Inventory Reference"/>
86                     <field name="date"/>
87                     <field name="company_id" groups="base.group_multi_company"/>
88                     <group expand="0" string="Group By...">
89                         <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
90                         <filter string="Inventories Month" icon="terp-go-month" domain="[]" context="{'group_by':'date'}" help="Physical Inventories by Month"/>
91                     </group>
92                 </search>
93
94             </field>
95         </record>
96
97         <record id="view_inventory_tree" model="ir.ui.view">
98             <field name="name">stock.inventory.tree</field>
99             <field name="model">stock.inventory</field>
100             <field name="arch" type="xml">
101                 <tree string="Lot Inventory" colors="grey:state == 'cancel'">
102                     <field name="name"/>
103                     <field name="date"/>
104                     <field name="state"/>
105                 </tree>
106             </field>
107         </record>
108
109         <record id="view_inventory_form" model="ir.ui.view">
110             <field name="name">stock.inventory.form</field>
111             <field name="model">stock.inventory</field>
112             <field name="arch" type="xml">
113                 <form string="Physical Inventory" version="7.0">
114                 <header>
115                     <button name="action_confirm" states="draft" string="Confirm Inventory" type="object" class="oe_highlight" groups="stock.group_stock_user"/>
116                     <button name="action_done" states="confirm" string="Validate Inventory" type="object" class="oe_highlight" groups="stock.group_stock_manager"/>
117                     <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object"/>
118                     <button name="action_cancel_inventory" states="draft,confirm,done" string="Cancel Inventory" type="object"/>
119                     <field name="state" widget="statusbar" statusbar_visible="draft,confirm"/>
120                 </header>
121                 <sheet>
122                     <div class="oe_right oe_button_box">
123                         <button name="%(action_view_stock_fill_inventory)d" string="Fill Inventory" states="draft,confirm" type="action" />
124                     </div>
125                     <group>
126                         <group>
127                             <field name="name" placeholder="e.g. Annual inventory"/>
128                         </group>
129                         <group>
130                             <field name="date"/>
131                             <field name="company_id" groups="base.group_multi_company" widget="selection"/>
132                         </group>
133                     </group>
134                     <notebook>
135                     <page string="General Information">
136                         <field name="inventory_line_id">
137                             <tree string="Products" editable="bottom">
138                                 <field domain="[('usage','=','internal')]" name="location_id" groups="stock.group_locations"/>
139                                 <field context="{'location':location_id, 'uom':product_uom, 'to_date':parent.date}" name="product_id" on_change="on_change_product_id(location_id,product_id,product_uom,parent.date)"  domain="[('type','&lt;&gt;','service')]"/>
140                                 <field name="product_qty"/>
141                                 <field name="product_uom" groups="product.group_uom"/>
142                                 <field name="prod_lot_id" groups="stock.group_production_lot"/>
143                                 <button name="%(stock.action_view_stock_inventory_line_split)d"
144                                     string="Split inventory lines" groups="stock.group_inventory_valuation"
145                                     type="action" icon="gtk-justify-fill" states="draft,confirm"/>
146                                 <field name="state" invisible="True"/>
147                             </tree>
148                             <form string="Products" version="7.0">
149                                 <group>
150                                     <group>
151                                         <field domain="[('usage','=','internal')]" name="location_id"/>
152                                         <field context="{'location':location_id, 'uom':product_uom, 'to_date':parent.date}" name="product_id" on_change="on_change_product_id(location_id,product_id,product_uom,parent.date)"  domain="[('type','&lt;&gt;','service')]"/>
153                                     </group>
154                                     <group>
155                                         <label for="product_qty"/>
156                                         <div>
157                                             <field name="product_qty" class="oe_inline"/>
158                                             <field name="product_uom" class="oe_inline" groups="product.group_uom"/>
159                                         </div>
160                                         <field name="prod_lot_id" groups="stock.group_production_lot"/>
161                                         <button name="%(stock.action_view_stock_inventory_line_split)d"
162                                         string="Split inventory lines" groups="stock.group_inventory_valuation"
163                                         type="action" icon="gtk-justify-fill"/>
164                                     </group>
165                                 </group>
166                             </form>
167                         </field>
168                     </page>
169                     <page string="Posted Inventory">
170                          <field name="move_ids" context="{'inventory_id':active_id}" options='{"reload_on_button": true}' >
171                             <tree string="Stock Moves">
172                                 <field name="product_id"/>
173                                 <field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
174                                 <field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
175                                 <field name="prodlot_id" groups="stock.group_production_lot"/>
176                                 <button name="%(track_line)d" string="Split in serial numbers" type="action"
177                                     icon="gtk-justify-fill"
178                                     attrs="{'invisible': [('prodlot_id','&lt;&gt;',False)]}"
179                                     states="draft,done,cancel"
180                                     context="{'inventory_id':parent.id}"
181                                     groups="stock.group_production_lot"/>
182                                 <field groups="stock.group_tracking_lot" name="tracking_id"/>
183                                 <button name="%(split_into)d" string="Put in a new pack" type="action"
184                                     groups="stock.group_tracking_lot"
185                                     icon="terp-accessories-archiver+"
186                                     context="{'inventory_id':parent.id}"
187                                     states="draft,done,cancel"/>
188                                 <field name="location_id" groups="stock.group_locations"/>
189                                 <field name="location_dest_id" groups="stock.group_locations"/>
190                                 <field name="date" string="Date"/>
191                                 <field name="state"  invisible="True"/>
192                             </tree>
193                          </field>
194                     </page>
195                     </notebook>
196                     </sheet>
197                 </form>
198             </field>
199         </record>
200
201         <record id="action_inventory_form" model="ir.actions.act_window">
202             <field name="name">Physical Inventories</field>
203             <field name="type">ir.actions.act_window</field>
204             <field name="res_model">stock.inventory</field>
205             <field name="view_type">form</field>
206             <field name="view_id" ref="view_inventory_tree"/>
207             <field name="search_view_id" ref="view_inventory_filter"/>
208             <field name="help" type="html">
209               <p class="oe_view_nocontent_create">
210                 Click to start an inventory. 
211               </p><p>
212                 Periodical Inventories are used to count the number of products
213                 available per location. You can use it once a year when you do
214                 the general inventory or whenever you need it, to adapt the
215                 current inventory level of a product.
216               </p>
217             </field>
218         </record>
219         <menuitem action="action_inventory_form" id="menu_action_inventory_form" parent="menu_stock_inventory_control" sequence="30"/>
220
221         <record id="action_inventory_form_draft" model="ir.actions.act_window">
222             <field name="name">Draft Physical Inventories</field>
223             <field name="type">ir.actions.act_window</field>
224             <field name="res_model">stock.inventory</field>
225             <field name="view_type">form</field>
226             <field name="domain">[('state','=','draft')]</field>
227             <field name="filter" eval="True"/>
228         </record>
229
230         <record id="view_tracking_form" model="ir.ui.view">
231             <field name="name">stock.tracking.form</field>
232             <field name="model">stock.tracking</field>
233             <field name="arch" type="xml">
234                 <form string="Packs" version="7.0">
235                     <group>
236                         <group groups="product.group_stock_packaging" string="Pack Identification">
237                             <field name="name"/>
238                             <field name="serial"/>
239                             <field name="date"/>
240                             <field name="active"/>
241                         </group>
242                         <group groups="stock.group_tracking_lot" string="Traceability">
243                             <button name="action_traceability" string="Upstream Traceability" type="object"
244                                  colspan="2"/>
245                             <button name="action_traceability" string="Downstream Traceability" type="object"
246                                 context="{'type': 'move_history_ids'}" colspan="2"/>
247                         </group>
248                     </group>
249                     <field name="move_ids"/>
250                 </form>
251             </field>
252         </record>
253         <record id="view_tracking_tree" model="ir.ui.view">
254             <field name="name">stock.tracking.tree</field>
255             <field name="model">stock.tracking</field>
256             <field name="arch" type="xml">
257                 <tree string="Packs">
258                     <field name="name"/>
259                     <field name="serial"/>
260                     <field name="date"/>
261                 </tree>
262             </field>
263         </record>
264         <record id="action_tracking_form" model="ir.actions.act_window">
265             <field name="name">Packs</field>
266             <field name="type">ir.actions.act_window</field>
267             <field name="res_model">stock.tracking</field>
268             <field name="view_type">form</field>
269             <field name="view_id" ref="view_tracking_tree"/>
270             <field name="help" type="html">
271               <p class="oe_view_nocontent_create">
272                 Click to add a tracking number.
273               </p><p>
274                 This is the list of all your packs. When you select a Pack, you
275                 can get the upstream or downstream traceability of the products
276                 contained in the pack.
277               </p>
278             </field>
279         </record>
280         <menuitem id="menu_traceability" name="Traceability" parent="menu_stock_root" 
281             sequence="3"/>
282         <menuitem action="action_tracking_form" id="menu_action_tracking_form"
283             groups="product.group_stock_packaging"
284             sequence="6"
285             parent="menu_traceability"/>
286
287         <record id="lot_line_tree" model="ir.ui.view">
288             <field name="name">stock.tracking.tree</field>
289             <field name="model">stock.tracking</field>
290             <field name="field_parent">child_ids</field>
291             <field name="arch" type="xml">
292                 <tree colors="grey:active == False" string="Packs">
293                     <field name="name"/>
294                     <field name="serial"/>
295                     <field name="date"/>
296                     <field name="active" invisible="1"/>
297                 </tree>
298             </field>
299         </record>
300
301         <record model="ir.ui.view" id="search_stock_packs">
302             <field name="name">Pack Search</field>
303             <field name="model">stock.tracking</field>
304             <field name="arch" type="xml">
305                 <search string="Pack Search">
306                     <field name="name" string="Pack" filter_domain="['|',('name','ilike',self),('serial','ilike',self)]"/>
307                     <field name="date"/>
308                     <field name="active"/>
309                 </search>
310             </field>
311         </record>
312
313         <record id="view_production_lot_revision_form" model="ir.ui.view">
314             <field name="name">stock.production.lot.revision.form</field>
315             <field name="model">stock.production.lot.revision</field>
316             <field name="arch" type="xml">
317                 <form string="Serial Number Revisions" version="7.0">
318                     <group col="4">
319                         <field name="name"/>
320                         <field name="indice"/>
321                         <field name="date"/>
322                         <field name="author_id"/>
323                     </group>
324                     <separator string="Description"/>
325                     <field name="description"/>
326                 </form>
327             </field>
328         </record>
329         <record id="view_production_lot_revision_tree" model="ir.ui.view">
330             <field name="name">stock.production.lot.revision.tree</field>
331             <field name="model">stock.production.lot.revision</field>
332             <field name="arch" type="xml">
333                 <tree string="Serial Number Revisions">
334                     <field name="indice"/>
335                     <field name="author_id"/>
336                     <field name="date"/>
337                     <field name="name"/>
338                 </tree>
339             </field>
340         </record>
341         <record id="view_production_lot_form" model="ir.ui.view">
342             <field name="name">stock.production.lot.form</field>
343             <field name="model">stock.production.lot</field>
344             <field name="arch" type="xml">
345                 <form string="Serial Number" version="7.0">
346                     <div class="oe_button_box oe_right">
347                         <button name="action_traceability" string="Upstream Traceability" type="object" context="{'type': 'move_history_ids2', 'field': 'prodlot_id'}"/>
348                         <button name="action_traceability" string="Downstream Traceability" type="object" context="{'type': 'move_history_ids', 'field': 'prodlot_id'}"/>
349                     </div>
350                     <div class="oe_title">
351                         <label for="name" class="oe_edit_only"/>
352                         <h1>
353                             <field name="name"/>
354                         </h1>
355                     </div>
356                     <group>
357                         <group>
358                             <field name="product_id"/>
359                             <field name="prefix"/>
360                             <field name="ref"/>
361                         </group>
362                         <group>
363                             <field name="date"/>
364                             <field name="stock_available"/>
365                         </group>
366                     </group>
367                     <notebook>
368                         <page string="Revisions">
369                             <field name="revisions"/>
370                         </page>
371                         <page string="Stock Moves">
372                             <field name="move_ids">
373                                 <tree  string="Stock Moves">
374                                     <field name="picking_id" string="Reference"/>
375                                     <field name="origin"/>
376                                     <field name="product_id"/>
377                                     <field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
378                                     <field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
379                                     <field name="tracking_id" groups="stock.group_tracking_lot"/>
380                                     <field name="date"/>
381                                     <field name="prodlot_id"/>
382                                     <field name="location_id" groups="stock.group_locations"/>
383                                     <field name="location_dest_id" groups="stock.group_locations"/>
384                                     <field name="state"/>
385                                 </tree>
386                              </field>
387                         </page>
388                     </notebook>
389                 </form>
390             </field>
391         </record>
392         <record id="view_production_lot_tree" model="ir.ui.view">
393             <field name="name">stock.production.lot.tree</field>
394             <field name="model">stock.production.lot</field>
395             <field name="arch" type="xml">
396                 <tree string="Serial Number">
397                     <field name="prefix"/>
398                     <field name="name"/>
399                     <field name="ref"/>
400                     <field name="product_id"/>
401                     <field name="stock_available"/>
402                     <field name="date"/>
403                 </tree>
404             </field>
405         </record>
406
407         <record model="ir.ui.view" id="search_product_lot_filter">
408             <field name="name">Production Lots Filter</field>
409             <field name="model">stock.production.lot</field>
410             <field name="arch" type="xml">
411                 <search string="Product Lots Filter">
412                     <field name="name" string="Product Lots" filter_domain="['|','|',('name','ilike',self),('prefix','ilike',self),('ref','ilike',self)]"/>
413                     <field name="date"/>
414                     <filter icon="terp-check" name="available" string="Available" domain="[('stock_available', '&gt;', 0)]" help="Available Product Lots"/>
415                     <field name="product_id"/>
416                     <group expand="0" string="Group By...">
417                         <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
418                     </group>
419                 </search>
420             </field>
421         </record>
422
423         <record id="action_production_lot_form" model="ir.actions.act_window">
424             <field name="name">Serial Number</field>
425             <field name="type">ir.actions.act_window</field>
426             <field name="res_model">stock.production.lot</field>
427             <field name="view_type">form</field>
428             <field name="view_id" ref="view_production_lot_tree"/>
429             <field name="search_view_id" ref="search_product_lot_filter"/>
430             <field name="context">{}</field>
431             <field name="help" type="html">
432               <p class="oe_view_nocontent_create">
433                 Click to add a serial number.
434               </p><p>
435                 This is the list of all the production lots you recorded. When
436                 you select a lot, you can get the upstream or downstream
437                 traceability of the products contained in lot. By default, the
438                 list is filtred on the serial numbers that are available in
439                 your warehouse but you can uncheck the 'Available' button to
440                 get all the lots you produced, received or delivered to
441                 customers.
442               </p>
443             </field>
444         </record>
445         <menuitem action="action_production_lot_form" id="menu_action_production_lot_form"
446             parent="menu_traceability" groups="stock.group_production_lot"
447             sequence="1"/>
448
449         #
450         # Lot composition (history)
451         #
452         <record id="stock_move_tree" model="ir.ui.view">
453             <field name="name">Stock Moves</field>
454             <field name="model">stock.move</field>
455             <field name="field_parent">move_history_ids</field>
456             <field name="arch" type="xml">
457                 <tree colors="grey:state == 'cancel'" string="Moves" create="false">
458                     <field name="product_id"/>
459                     <field name="product_qty"/>
460                     <field name="product_uom"  string="Unit of Measure" groups="product.group_uom"/>
461                     <field name="prodlot_id"  groups="stock.group_production_lot"/>
462                     <field name="tracking_id" groups="stock.group_tracking_lot"/>
463                     <field name="product_packaging" domain="[('product_id','=',product_id)]" groups="product.group_stock_packaging"/>
464                     <field name="picking_id"/>
465                     <field name="location_id" groups="stock.group_locations"/>
466                     <field name="location_dest_id" groups="stock.group_locations"/>
467                     <field name="create_date" groups="base.group_no_one"/>
468                     <field name="date" string="Date" groups="base.group_no_one"/>
469                     <field name="date_expected" string="Date Expected"/>
470                     <field name="state"/>
471                 </tree>
472             </field>
473         </record>
474
475         <record id="stock_move_tree2" model="ir.ui.view">
476             <field name="name">Stock Moves</field>
477             <field name="model">stock.move</field>
478             <field name="field_parent">move_history_ids2</field>
479             <field name="arch" type="xml">
480                 <tree colors="grey:state == 'cancel'" string="Moves" create="false">
481                     <field name="product_id"/>
482                     <field name="product_qty"/>
483                     <field name="product_uom"  string="Unit of Measure" groups="product.group_uom"/>
484                     <field name="prodlot_id"  groups="stock.group_production_lot"/>
485                     <field name="tracking_id" groups="stock.group_tracking_lot"/>
486                     <field name="product_packaging" domain="[('product_id','=',product_id)]" groups="product.group_stock_packaging"/>
487                     <field name="picking_id"/>
488                     <field name="location_id" groups="stock.group_locations"/>
489                     <field name="location_dest_id" groups="stock.group_locations"/>
490                     <field name="create_date" groups="base.group_no_one"/>
491                     <field name="date" string="Date" groups="base.group_no_one"/>
492                     <field name="date_expected" string="Date Expected"/>
493                     <field name="state"/>
494                 </tree>
495             </field>
496         </record>
497
498         <record id="action3" model="ir.actions.act_window">
499             <field name="name">Downstream traceability</field>
500             <field name="type">ir.actions.act_window</field>
501             <field name="res_model">stock.move</field>
502             <field name="domain">[('id','in',active_ids)]</field>
503             <field name="view_type">tree</field>
504             <field eval="stock_move_tree2" name="view_id"/>
505         </record>
506
507         <record id="ir_move_traceability_upstream" model="ir.values">
508             <field name="key2">tree_but_action</field>
509             <field name="model">stock.move</field>
510             <field name="name">Downstream traceability</field>
511             <field eval="'ir.actions.act_window,'+str(action3)" name="value"/>
512         </record>
513
514         <record id="action5" model="ir.actions.act_window">
515             <field name="name">Upstream traceability</field>
516             <field name="type">ir.actions.act_window</field>
517             <field name="res_model">stock.move</field>
518             <field name="domain">[('id','in',active_ids)]</field>
519             <field name="view_type">tree</field>
520             <field eval="stock_move_tree" name="view_id"/>
521         </record>
522
523         <record id="ir_move_traceability_downstream" model="ir.values">
524             <field name="key2">tree_but_action</field>
525             <field name="model">stock.move</field>
526             <field name="name">Upstream traceability</field>
527             <field eval="'ir.actions.act_window,'+str(action5)" name="value"/>
528         </record>
529
530         <record id="view_location_form" model="ir.ui.view">
531             <field name="name">stock.location.form</field>
532             <field name="model">stock.location</field>
533             <field name="arch" type="xml">
534                 <form string="Stock Location" version="7.0">
535                     <label for="name" class="oe_edit_only"/>
536                     <h1><field name="name"/></h1>
537                     <label for="location_id" class="oe_edit_only"/>
538                     <h2><field name="location_id"/></h2>
539                     <group>
540                         <group string="Additional Information">
541                             <field name="usage"/>
542                             <field name="partner_id"/>
543                             <field name="company_id" groups="base.group_multi_company" widget="selection"/>
544                             <field name="icon"/>
545                             <field name="scrap_location"/>
546                             <field name="active"/>
547                         </group>
548                         <group string="Chained Locations">
549                             <field name="chained_location_type"/>
550                             <field name="chained_location_id"  attrs="{'required':[('chained_location_type','=','fixed')],'invisible':[('chained_location_type','in',['none','customer'])]}"/>
551                             <field name="chained_auto_packing"/>
552                             <field name="chained_delay"/>
553                             <field name="chained_journal_id"/>
554                             <field name="chained_picking_type"/>
555                             <field name="chained_company_id" widget="selection"/>
556                         </group>
557                         <group string="Localization">
558                             <field name="posx"/>
559                             <field name="posy"/>
560                             <field name="posz"/>
561                         </group><group string="Accounting Information" attrs="{'invisible':[('usage','not in',('inventory','production'))]}">
562                             <field name="valuation_in_account_id"/>
563                             <field name="valuation_out_account_id"/>
564                         </group>
565                     </group>
566                     <separator string="Additional Information"/>
567                     <field name="comment"/>
568                 </form>
569             </field>
570         </record>
571
572         <record id="view_location_search" model="ir.ui.view">
573             <field name="name">stock.location.search</field>
574             <field name="model">stock.location</field>
575             <field name="arch" type="xml">
576                 <search string="Stock Locations">
577                     <field name="name" string="Stock Locations"/>
578                     <filter icon="terp-go-home" name="in_location" string="Internal" domain="[('usage', '=', 'internal')]" help="Internal Locations"/>
579                     <filter icon="terp-personal" name="customer" string="Customer" domain="[('usage', '=', 'customer')]" help="Customer Locations"/>
580                     <filter icon="terp-personal" name="supplier" string="Supplier" domain="[('usage', '=', 'supplier')]" help="Supplier Locations"/>
581                     <field name="location_id" string="Parent Location"/>
582                 </search>
583             </field>
584         </record>
585
586
587         <record id="view_location_tree2" model="ir.ui.view">
588             <field name="name">stock.location.tree</field>
589             <field name="model">stock.location</field>
590             <field name="priority" eval="2"/>
591             <field name="arch" type="xml">
592                 <tree string="Stock Location" colors="blue:usage=='view';darkred:usage=='internal'">
593                     <field name="complete_name"/>
594                     <field name="usage"/>
595                     <field name="stock_real" invisible="'product_id' not in context"/>
596                     <field name="stock_virtual" invisible="'product_id' not in context"/>
597                 </tree>
598             </field>
599         </record>
600
601         <record id="action_location_form" model="ir.actions.act_window">
602             <field name="name">Locations</field>
603             <field name="res_model">stock.location</field>
604             <field name="type">ir.actions.act_window</field>
605             <field name="view_type">form</field>
606             <field name="view_id" ref="view_location_tree2"/>
607             <field name="search_view_id" ref="view_location_search"/>
608             <field name="context">{'search_default_in_location':1}</field>
609             <field name="help" type="html">
610               <p class="oe_view_nocontent_create">
611                 Click to add a location.
612               </p><p>
613                 Define your locations to reflect your warehouse structure and
614                 organization. OpenERP is able to manage physical locations
615                 (warehouses, shelves, bin, etc), partner locations (customers,
616                 suppliers) and virtual locations which are the counterpart of
617                 the stock operations like the manufacturing orders
618                 consumptions, inventories, etc.
619               </p><p>  
620                 Every stock operation in OpenERP moves the products from one
621                 location to another one.  For instance, if you receive products
622                 from a supplier, OpenERP will move products from the Supplier
623                 location to the Stock location. Each report can be performed on
624                 physical, partner or virtual locations.
625               </p>
626             </field>
627         </record>
628         <menuitem action="action_location_form" id="menu_action_location_form" groups="stock.group_locations"
629             parent="menu_stock_configuration" sequence="5"/>
630
631         <record id="view_location_tree" model="ir.ui.view">
632             <field name="name">stock.location.tree</field>
633             <field name="model">stock.location</field>
634             <field name="field_parent">child_ids</field>
635             <field name="arch" type="xml">
636                 <tree toolbar="1" string="Locations" >
637                     <field icon="icon" name="name"/>
638                 </tree>
639             </field>
640         </record>
641         <record model="ir.actions.act_window" id="action_product_location_tree">
642             <field name="context">{'product_id': active_id}</field>
643             <field name="name">Stock by Location</field>
644             <field name="res_model">stock.location</field>
645         </record>
646         <record id="act_product_stock_move_open" model="ir.actions.act_window">
647             <field name="context">{'search_default_done': 1,'search_default_product_id': active_id, 'default_product_id': active_id}</field>
648             <field name="name">Moves</field>
649             <field name="res_model">stock.move</field>
650         </record>
651         <record id="action_location_tree" model="ir.actions.act_window">
652             <field name="name">Location Structure</field>
653             <field name="res_model">stock.location</field>
654             <field name="type">ir.actions.act_window</field>
655             <field name="domain">[('location_id','=',False)]</field>
656             <field name="view_type">tree</field>
657             <field name="view_id" ref="view_location_tree"/>
658             <field name="help" type="html">
659               <p class="oe_view_nocontent_create">
660                 Click to add a location.
661               </p><p>
662                 This is the structure of your company's warehouses and
663                 locations. You can click on a location to get the list of the
664                 products and their stock level in this particular location and
665                 all its children.
666               </p>
667             </field>
668         </record>
669         <menuitem action="action_location_tree"
670             id="menu_action_location_tree"
671             parent="menu_stock_inventory_control"
672             groups="stock.group_locations"
673             sequence="20"/>
674
675         <record id="view_warehouse" model="ir.ui.view">
676             <field name="name">stock.warehouse</field>
677             <field name="model">stock.warehouse</field>
678             <field name="arch" type="xml">
679                 <form string="Warehouse" version="7.0">
680                     <label for="name" class="oe_edit_only"/>
681                     <h1><field name="name"/></h1>
682                     <group>
683                         <group>
684                             <field name="lot_input_id" groups="stock.group_locations"/>
685                             <field name="lot_stock_id" groups="stock.group_locations"/>
686                             <field name="lot_output_id" groups="stock.group_locations"/>
687                         </group>
688                         <group>
689                             <field name="company_id" groups="base.group_multi_company" widget="selection"/>
690                             <field name="partner_id"/>
691                         </group>
692                     </group>
693                 </form>
694             </field>
695         </record>
696         <record id="view_warehouse_tree" model="ir.ui.view">
697             <field name="name">stock.warehouse.tree</field>
698             <field name="model">stock.warehouse</field>
699             <field name="arch" type="xml">
700                 <tree string="Warehouse">
701                     <field name="name"/>
702                     <field name="lot_input_id" groups="stock.group_locations"/>
703                     <field name="lot_stock_id" groups="stock.group_locations"/>
704                     <field name="lot_output_id" groups="stock.group_locations"/>
705                     <field name="partner_id"/>
706                 </tree>
707             </field>
708         </record>
709         <record id="action_warehouse_form" model="ir.actions.act_window">
710             <field name="name">Warehouses</field>
711             <field name="res_model">stock.warehouse</field>
712             <field name="type">ir.actions.act_window</field>
713             <field name="view_type">form</field>
714             <field name="view_id" ref="view_warehouse_tree"/>
715             <field name="help" type="html">
716               <p class="oe_view_nocontent_create">
717                 Click to define a new warehouse.
718               </p>
719             </field>
720         </record>
721         <menuitem action="action_warehouse_form" id="menu_action_warehouse_form" groups="stock.group_locations"
722             parent="menu_stock_configuration" sequence="1"/>
723
724         <!--
725             Stock picking
726             Defaults and Internal Pickings
727         -->
728
729         <record model="ir.ui.view" id="stock_picking_calendar">
730             <field name="name">stock.picking.calendar</field>
731             <field name="model">stock.picking</field>
732             <field name="priority" eval="2"/>
733             <field name="arch" type="xml">
734                 <calendar string="Calendar View" date_start="min_date" date_stop="max_date" color="partner_id">
735                     <field name="origin"/>
736                     <field name="type"/>
737                     <field name="partner_id"/>
738                 </calendar>
739             </field>
740         </record>
741
742         <record id="vpicktree" model="ir.ui.view">
743             <field name="name">stock.picking.tree</field>
744             <field name="model">stock.picking</field>
745             <field name="arch" type="xml">
746                 <tree colors="blue:state == 'draft';grey:state == 'cancel';red:state not in ('cancel', 'done') and date &lt; current_date" string="Picking list">
747                     <field name="name"/>
748                     <field name="backorder_id"/>
749                     <field name="origin"/>
750                     <field name="date"/>
751                     <field name="min_date"/>
752                     <field name="invoice_state"/>
753                     <field name="stock_journal_id" widget="selection"/>
754                     <field name="state"/>
755                 </tree>
756             </field>
757         </record>
758
759         <record id="view_picking_form" model="ir.ui.view">
760             <field name="name">stock.picking.form</field>
761             <field name="model">stock.picking</field>
762             <field eval="12" name="priority"/>
763             <field name="arch" type="xml">
764                 <form string="Internal Picking List" version="7.0">
765                 <header>
766                     <button name="draft_force_assign" states="draft" string="Confirm" type="object" class="oe_highlight" groups="base.group_user"/>
767                     <button name="draft_validate" states="draft" string="Confirm &amp; Transfer" type="object" class="oe_highlight" groups="base.group_user"/>
768                     <button name="action_assign" states="confirmed" string="Check Availability" type="object" class="oe_highlight"/>
769                     <button name="force_assign" states="confirmed" string="Force Availability" type="object" class="oe_highlight" groups="base.group_user"/>
770                     <button name="action_process" states="assigned" string="Confirm &amp; Transfer" groups="stock.group_stock_user" type="object" class="oe_highlight"/>
771                     <button name="%(action_stock_invoice_onshipping)d" string="Create Invoice/Refund"  attrs="{'invisible': ['|','|',('state','&lt;&gt;','done'),('invoice_state','=','invoiced'),('invoice_state','=','none')]}" context="{'group_field_invisible': True}" type="action" class="oe_highlight" groups="base.group_user"/>
772                     <button name="%(act_stock_return_picking)d" string="Reverse Transfer" states="done" type="action" groups="base.group_user"/>
773                     <button name="button_cancel" states="assigned,confirmed,draft" string="Cancel Transfer" groups="base.group_user"/>
774                     <field name="state" widget="statusbar" statusbar_visible="draft,assigned,done" statusbar_colors='{"shipping_except":"red","invoice_except":"red","waiting_date":"blue"}'/>
775                 </header>
776                 <sheet>
777                     <h1>
778                         <field name="name" class="oe_inline" attrs="{'invisible': [('name','=','/')]}" readonly="1"/>
779                     </h1>
780                     <group>
781                         <group>
782                             <field name="partner_id" on_change="onchange_partner_in(partner_id)"/>
783                             <field name="backorder_id" readonly="1" attrs="{'invisible': [('backorder_id','=',False)]}"/>
784                             <field name="invoice_state" string="Invoice Control" groups="account.group_account_invoice" attrs="{'invisible':[('invoice_state', '=', 'none')]}"/>
785                             <field name="stock_journal_id" widget="selection" groups="account.group_account_user"/>
786                         </group>
787                         <group>
788                             <field name="date"/>
789                             <field name="min_date" readonly="1" attrs="{'invisible': [('min_date','=',False)]}"/>
790                             <field name="origin" placeholder="e.g. PO0032" class="oe_inline"/>
791                         </group>
792                     </group>
793                     <notebook>
794                         <page string="Products">
795                             <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', 'picking_type': 'internal'}" options='{"reload_on_button": true}'/>
796                             <field name="note" placeholder="Add an internal note..." class="oe_inline"/>
797                         </page>
798                         <page string="Additional Info">
799                             <group>
800                                 <group>
801                                     <field name="move_type"/>
802                                     <field name="type" invisible="1"/>
803                                     <field name="auto_picking" groups="base.group_user"/>
804                                 </group>
805                                 <group>
806                                     <field name="company_id" groups="base.group_multi_company" widget="selection"/>
807                                     <field name="date_done" groups="base.group_no_one"/>
808                                 </group>
809                             </group>
810                         </page>
811                     </notebook>
812                 </sheet>
813                 </form>
814             </field>
815         </record>
816
817         <record id="view_picking_internal_search" model="ir.ui.view">
818             <field name="name">stock.picking.internal.search</field>
819             <field name="model">stock.picking</field>
820             <field name="arch" type="xml">
821                 <search string="Internal Picking List">
822                     <field name="name" string="Internal Picking List" filter_domain="['|',('name','ilike', self),('origin','ilike',self)]"/>
823                     <filter icon="terp-check" name="available" string="Ready" domain="[('state','=','assigned')]" help="Assigned Internal Moves"/>
824                     <filter icon="terp-camera_test" name="confirmed" string="Waiting" domain="[('state','=','confirmed')]" help="Confirmed Internal Moves"/>
825                     <filter icon="terp-dialog-close" name="done" string="Done" domain="[('state','=','done')]" help="Pickings already processed"/>
826                     <field name="partner_id" filter_domain="[('partner_id','child_of',self)]"/>
827                     <field name="product_id"/>
828                     <field name="stock_journal_id"/>
829                     <group expand="0" string="Group By...">
830                         <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
831                         <filter string="Order Date" icon="terp-go-month" domain="[]"  context="{'group_by':'date'}"/>
832                         <filter string="Expected Date" icon="terp-go-month" domain="[]"  context="{'group_by':'min_date'}"/>
833                         <filter string="Origin" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'origin'}"/>
834                         <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'stock_journal_id'}"/>
835                     </group>
836                 </search>
837             </field>
838         </record>
839
840         <record id="action_picking_tree6" model="ir.actions.act_window">
841             <field name="name">Internal Moves</field>
842             <field name="res_model">stock.picking</field>
843             <field name="type">ir.actions.act_window</field>
844             <field name="view_type">form</field>
845             <field name="view_mode">tree,form,calendar</field>
846             <field name="domain">[('type','=','internal')]</field>
847             <field name="context">{'contact_display': 'partner_address', 'search_default_available': 1}</field>
848             <field name="search_view_id" ref="view_picking_internal_search"/>
849             <field name="help" type="html">
850               <p class="oe_view_nocontent_create">
851                 Click to create an internal move request. 
852               </p><p>
853                 Most operations are prepared automatically by OpenERP according
854                 to your preconfigured logistics rules, but you can also record
855                 manual stock movements.
856               </p>
857             </field>
858         </record>
859
860         <record model="ir.actions.act_window.view" id="action_picking_tree6_tree_view">
861             <field name="sequence" eval="1"/>
862             <field name="view_mode">tree</field>
863             <field name="view_id" ref="vpicktree"/>
864             <field name="act_window_id" ref="action_picking_tree6"/>
865         </record>
866         <record model="ir.actions.act_window.view" id="action_picking_tree6_form_view">
867             <field name="sequence" eval="2"/>
868             <field name="view_mode">form</field>
869             <field name="view_id" ref="view_picking_form"/>
870             <field name="act_window_id" ref="action_picking_tree6"/>
871         </record>
872
873         <!-- Sending Products -->
874         <record model="ir.ui.view" id="stock_picking_out_calendar">
875             <field name="name">stock.picking.out.calendar</field>
876             <field name="model">stock.picking.out</field>
877             <field name="priority" eval="2"/>
878             <field name="arch" type="xml">
879                 <calendar string="Calendar View" date_start="min_date" date_stop="max_date" color="partner_id">
880                     <field name="origin"/>
881                     <field name="type"/>
882                     <field name="partner_id"/>
883                 </calendar>
884             </field>
885         </record>
886         
887         <record id="view_picking_out_tree" model="ir.ui.view">
888             <field name="name">stock.picking.out.tree</field>
889             <field name="model">stock.picking.out</field>
890             <field name="arch" type="xml">
891                 <tree colors="blue:state == 'draft';grey:state == 'cancel';red:state not in ('cancel', 'done') and min_date &lt; current_date" string="Delivery Orders">
892                     <field name="name"/>
893                     <field name="partner_id" string="Customer"/>
894                     <field name="origin"/>
895                     <field name="min_date"/>
896                     <field name="date"/>
897                     <field name="backorder_id"/>
898                     <field name="stock_journal_id" groups="account.group_account_user"/>
899                     <field name="invoice_state"/>
900                     <field name="state"/>
901                 </tree>
902             </field>
903         </record>
904         <record id="view_picking_out_form" model="ir.ui.view">
905             <field name="name">stock.picking.out.form</field>
906             <field name="model">stock.picking.out</field>
907             <field name="inherit_id" ref="view_picking_form"/>
908             <field name="arch" type="xml">
909                 <field name="date_done" position="attributes" version="7.0">
910                     <attribute name="string">Date of Delivery</attribute>
911                 </field>
912                 <xpath expr="/form/header//button[@name='%(act_stock_return_picking)d']" position="replace">
913                     <button name="%(report_picking_list_out)d" string="Print Delivery Slip" type="action" states="done" class="oe_highlight"/>
914                     <button name="%(act_stock_return_picking)d" string="Return Products" states="done" type="action"/>
915                 </xpath>
916                 <xpath expr="/form/header//button[@name='draft_validate']" position="replace">
917                     <button name="draft_validate" states="draft" string="Confirm &amp; Deliver" type="object" class="oe_highlight"/>
918                 </xpath>
919                 <xpath expr="/form/header//button[@name='action_process']" position="replace">
920                     <button name="action_process" states="assigned" string="Deliver" type="object" class="oe_highlight"/>
921                 </xpath>
922                 <xpath expr="/form/header//field[@name='state']" position="replace">
923                     <field name="state" nolabel="1" readonly="1" widget="statusbar" statusbar_visible="draft,confirmed,assigned,done" statusbar_colors='{"auto":"blue", "confirmed":"blue"}'/>
924                 </xpath>
925                 <xpath expr="//field[@name='partner_id']" position="replace">
926                     <field name="partner_id" on_change="onchange_partner_in(partner_id)" string="Customer" domain="[('customer','=',True)]" />
927                 </xpath>
928                 <xpath expr="//field[@name='move_lines']" position="replace">
929                     <field name="move_lines" context="{'address_out_id': partner_id, 'picking_type': 'out', 'form_view_ref':'stock.view_move_picking_form', 'tree_view_ref':'stock.view_move_picking_tree'}" options='{"reload_on_button": true}'/>
930                 </xpath>
931                 <xpath expr="/form/sheet" position="after">
932                     <div class="oe_chatter">
933                         <field name="message_follower_ids" widget="mail_followers"/>
934                         <field name="message_ids" widget="mail_thread"/>
935                     </div>
936                 </xpath>
937             </field>
938         </record>
939         <record id="view_picking_out_search" model="ir.ui.view">
940             <field name="name">stock.picking.out.search</field>
941             <field name="model">stock.picking</field>
942             <field name="arch" type="xml">
943                 <search string="Picking list">
944                     <field name="name" string="Picking List" filter_domain="['|',('name','ilike', self),('origin','ilike',self)]"/>
945                     <filter icon="terp-check" name="available" string="Ready" domain="[('state','=','assigned')]" help="Assigned Delivery Orders"/>
946                     <filter icon="terp-camera_test" name="confirmed" string="Waiting" domain="[('state','=','confirmed')]" help="Confirmed Delivery Orders"/>
947                     <filter icon="terp-dialog-close" name="done" string="Done" domain="[('state','=','done')]" help="Delivery orders already processed"/>
948                     <separator/>
949                     <filter icon="terp-accessories-archiver-minus" string="Back Orders" domain="[('backorder_id', '!=', False)]" help="Is a Back Order"/>
950                     <separator/>
951                     <filter icon="terp-dolar" name="to_invoice" string="To Invoice" domain="[('invoice_state','=','2binvoiced')]" help="Delivery orders to invoice"/>
952                     <field name="partner_id" filter_domain="[('partner_id','child_of',self)]"/>
953                     <field name="stock_journal_id"/>
954                     <field name="company_id" groups="base.group_multi_company"/>
955                     <group expand="0" string="Group By...">
956                         <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
957                         <filter string="Order Month" icon="terp-go-month" domain="[]"  context="{'group_by':'date'}"/>
958                         <filter string="Expected Month" icon="terp-go-month" domain="[]"  context="{'group_by':'min_date'}"/>
959                         <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'stock_journal_id'}"/>
960                     </group>
961                 </search>
962             </field>
963         </record>
964
965         <record id="action_picking_tree" model="ir.actions.act_window">
966             <field name="name">Delivery Orders</field>
967             <field name="res_model">stock.picking.out</field>
968             <field name="type">ir.actions.act_window</field>
969             <field name="view_type">form</field>
970             <field name="view_mode">tree,form,calendar</field>
971             <field name="domain">[('type','=','out')]</field>
972             <field name="context">{'default_type': 'out', 'contact_display': 'partner_address'}</field>
973             <field name="search_view_id" ref="view_picking_out_search"/>
974             <field name="help" type="html">
975               <p class="oe_view_nocontent_create">
976                 Click to create a delivery order. 
977               </p><p>
978                 This is the list of all delivery orders that have to be
979                 prepared, according to your different sales orders and your
980                 logistics rules.
981               </p>
982             </field>
983         </record>
984         <record id="action_picking_tree_out_view1_waiting" model="ir.actions.act_window.view">
985             <field eval="1" name="sequence"/>
986             <field name="view_mode">tree</field>
987             <field name="view_id" ref="view_picking_out_tree"/>
988             <field name="act_window_id" ref="action_picking_tree"/>
989         </record>
990         <record id="action_picking_tree_out_view2_waiting" model="ir.actions.act_window.view">
991             <field eval="2" name="sequence"/>
992             <field name="view_mode">form</field>
993             <field name="view_id" ref="view_picking_out_form"/>
994             <field name="act_window_id" ref="action_picking_tree"/>
995         </record>
996         <record id="action_picking_tree_out_view2_waiting_cal" model="ir.actions.act_window.view">
997             <field eval="3" name="sequence"/>
998             <field name="view_mode">calendar</field>
999             <field name="view_id" ref="stock_picking_out_calendar"/>
1000             <field name="act_window_id" ref="action_picking_tree"/>
1001         </record>
1002         <menuitem action="action_picking_tree" id="menu_action_picking_tree" parent="menu_stock_warehouse_mgmt" sequence="3"/>
1003
1004         <!-- Incomming Shipments -->
1005         <record model="ir.ui.view" id="stock_picking_in_calendar">
1006             <field name="name">stock.picking.in.calendar</field>
1007             <field name="model">stock.picking.in</field>
1008             <field name="priority" eval="2"/>
1009             <field name="arch" type="xml">
1010                 <calendar string="Calendar View" date_start="min_date" date_stop="max_date" color="partner_id">
1011                     <field name="origin"/>
1012                     <field name="type"/>
1013                     <field name="partner_id"/>
1014                 </calendar>
1015             </field>
1016         </record>
1017
1018         <record id="view_picking_in_tree" model="ir.ui.view">
1019             <field name="name">stock.picking.in.tree</field>
1020             <field name="model">stock.picking.in</field>
1021             <field name="arch" type="xml">
1022                 <tree colors="blue:state == 'draft';grey:state == 'done';red:state not in ('cancel', 'done') and date &lt; current_date" string="Picking list">
1023                     <field name="name"/>
1024                     <field name="partner_id" string="Supplier"/>
1025                     <field name="backorder_id"/>
1026                     <field name="origin"/>
1027                     <field name="date"/>
1028                     <field name="min_date"/>
1029                     <field name="invoice_state" groups="account.group_account_invoice"/>
1030                     <field name="stock_journal_id" widget="selection" groups="account.group_account_user"/>
1031                     <field name="state"/>
1032                 </tree>
1033             </field>
1034         </record>
1035         <record id="view_picking_in_form" model="ir.ui.view">
1036             <field name="name">stock.picking.in.form</field>
1037             <field name="model">stock.picking.in</field>
1038             <field name="inherit_id" ref="view_picking_form"/>
1039             <field name="arch" type="xml">
1040                 <field name="date_done" position="attributes" version="7.0">
1041                     <attribute name="string">Date of Reception</attribute>
1042                 </field>
1043                 <xpath expr="/form/header//button[@name='%(act_stock_return_picking)d']" position="replace">
1044                     <button name="%(act_stock_return_picking)d" string="Return Products" states="done" type="action"/>
1045                 </xpath>
1046                 <xpath expr="//button[@name='draft_validate']" position="replace">
1047                     <button name="draft_validate" states="draft" string="Confirm &amp; Receive" type="object" class="oe_highlight"/>
1048                 </xpath>
1049                 <xpath expr="//button[@name='action_process']" position="replace">
1050                     <button name="action_process" states="assigned" string="Receive" type="object" class="oe_highlight"/>
1051                 </xpath>
1052                 <xpath expr="//field[@name='partner_id']" position="replace">
1053                     <field name="partner_id" on_change="onchange_partner_in(partner_id)" string="Supplier" domain="[('supplier','=',True)]" context="{'default_supplier':1,'default_customer':0}"/>
1054                 </xpath>
1055                 <xpath expr="//field[@name='move_lines']" position="replace">
1056                     <field name="move_lines" context="{'address_in_id': partner_id, 'picking_type': 'in', 'form_view_ref':'stock.view_move_picking_form', 'tree_view_ref':'stock.view_move_picking_tree'}" options='{"reload_on_button": true}'/>
1057                 </xpath>
1058                 <xpath expr="/form/sheet" position="after">
1059                     <div class="oe_chatter">
1060                         <field name="message_follower_ids" widget="mail_followers"/>
1061                         <field name="message_ids" widget="mail_thread"/>
1062                     </div>
1063                 </xpath>
1064             </field>
1065         </record>
1066         <record id="view_picking_in_search" model="ir.ui.view">
1067             <field name="name">stock.picking.in.search</field>
1068             <field name="model">stock.picking.in</field>
1069             <field name="arch" type="xml">
1070                 <search string="Incoming Shipments">
1071                     <field name="name" string="Incoming Shipments" filter_domain="['|',('name','ilike',self),('origin','ilike',self)]"/>
1072                     <filter icon="terp-check" name="available" string="Ready to Process" domain="[('state','=','assigned')]" help="Incoming Shipments Available"/>
1073                     <filter icon="terp-dialog-close" name="done" string="Done" domain="[('state','=','done')]" help="Incoming Shipments already processed"/>
1074                     <separator/>
1075                     <filter icon="terp-accessories-archiver-minus" string="Back Orders" domain="[('backorder_id', '!=', False)]" help="Is a Back Order"/>
1076                     <separator/>
1077                     <filter string="To Invoice" name="to_invoice" icon="terp-dolar" domain="[('invoice_state', '=', '2binvoiced')]"/>
1078                     <field name="partner_id" filter_domain="[('partner_id','child_of',self)]"/>
1079                     <field name="stock_journal_id"/>
1080                     <field name="product_id"/>
1081                     <group expand="0" string="Group By...">
1082                         <filter icon="terp-stock_effects-object-colorize" name="state" string="Status" domain="[]" context="{'group_by':'state'}"/>
1083                         <filter string="Order Month" icon="terp-go-month" domain="[]"  context="{'group_by':'date'}"/>
1084                         <filter string="Expected Month" icon="terp-go-month" domain="[]"  context="{'group_by':'min_date'}"/>
1085                         <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'stock_journal_id'}"/>
1086                     </group>
1087                 </search>
1088             </field>
1089         </record>
1090
1091
1092         <record id="action_picking_tree4" model="ir.actions.act_window">
1093             <field name="name">Incoming Shipments</field>
1094             <field name="res_model">stock.picking.in</field>
1095             <field name="type">ir.actions.act_window</field>
1096             <field name="view_type">form</field>
1097             <field name="view_mode">tree,form,calendar</field>
1098             <field name="domain">[('type','=','in')]</field>
1099             <field name="context">{'contact_display': 'partner_address', 'default_type': 'in'}</field>
1100             <field name="search_view_id" ref="view_picking_in_search"/>
1101             <field name="help" type="html">
1102               <p class="oe_view_nocontent_create">
1103                 Click to create an incoming shipment. 
1104               </p><p>
1105                 The Incoming Shipments is the list of all orders you will
1106                 receive from your suppliers. An incoming shipment contains a
1107                 list of products to be received according to the original
1108                 purchase order.
1109               </p>
1110             </field>
1111         </record>
1112         <record id="action_invoice_tree5_view1" model="ir.actions.act_window.view">
1113             <field eval="1" name="sequence"/>
1114             <field name="view_mode">tree</field>
1115             <field name="view_id" ref="view_picking_in_tree"/>
1116             <field name="act_window_id" ref="action_picking_tree4"/>
1117         </record>
1118         <record id="action_invoice_tree5_view2" model="ir.actions.act_window.view">
1119             <field eval="2" name="sequence"/>
1120             <field name="view_mode">form</field>
1121             <field name="view_id" ref="view_picking_in_form"/>
1122             <field name="act_window_id" ref="action_picking_tree4"/>
1123         </record>
1124         <record id="action_invoice_tree5_view2_cal" model="ir.actions.act_window.view">
1125             <field eval="3" name="sequence"/>
1126             <field name="view_mode">calendar</field>
1127             <field name="view_id" ref="stock_picking_in_calendar"/>
1128             <field name="act_window_id" ref="action_picking_tree4"/>
1129         </record>
1130         <menuitem action="action_picking_tree4" id="menu_action_picking_tree4" parent="menu_stock_warehouse_mgmt" sequence="1"/>
1131
1132         <menuitem action="action_picking_tree6" id="menu_action_picking_tree6" parent="menu_stock_warehouse_mgmt" sequence="2" groups="stock.group_locations"/>
1133
1134         <record id="view_move_tree" model="ir.ui.view">
1135             <field name="name">stock.move.tree</field>
1136             <field name="model">stock.move</field>
1137             <field eval="8" name="priority"/>
1138             <field name="arch" type="xml">
1139                 <tree colors="grey:state == 'cancel';red:(state not in ('cancel','done')) and date > current_date" string="Moves">
1140                     <field name="name"/>
1141                     <field name="picking_id" string="Reference"/>
1142                     <field name="origin"/>
1143                     <field name="type" on_change="onchange_move_type(type)"/>
1144                     <field name="create_date" invisible="1" groups="base.group_no_one"/>
1145                     <field name="product_id" on_change="onchange_product_id(product_id,location_id,location_dest_id, False)"/>
1146                     <field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
1147                     <field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
1148                     <field name="product_uos" groups="product.group_uos"/>
1149                     <button name="%(stock.move_scrap)d"
1150                         string="Scrap Products" type="action"
1151                         icon="terp-gtk-jump-to-ltr" context="{'scrap': True}"
1152                         states="draft,waiting,confirmed,assigned"/>
1153                     <field name="prodlot_id" groups="stock.group_production_lot"/>
1154                     <button name="%(track_line)d" string="Split in Serial Numbers" type="action"
1155                         icon="gtk-justify-fill" attrs="{'invisible': [('prodlot_id','&lt;&gt;',False)]}"
1156                         states="draft,waiting,confirmed,assigned,done"
1157                         groups="stock.group_tracking_lot"/>
1158                     <field name="tracking_id" groups="stock.group_tracking_lot"/>
1159                     <button name="setlast_tracking" string="Put in current pack" type="object"
1160                         groups="product.group_stock_packaging"
1161                         icon="terp-accessories-archiver" attrs="{'invisible': [('tracking_id','&lt;&gt;',False)]}"
1162                         states="draft,assigned,confirmed,done"/>
1163                     <button name="%(split_into)d" string="Put in a new pack" type="action"
1164                         groups="product.group_stock_packaging"
1165                         icon="terp-accessories-archiver+"
1166                         states="draft,assigned,confirmed,done"/>
1167                     <field name="location_id" groups="stock.group_locations"/>
1168                     <field name="location_dest_id" groups="stock.group_locations"/>
1169                     <field name="date" groups="base.group_no_one"/>
1170                     <field name="date_expected"/>
1171                     <field name="state"/>
1172                     <button name="action_done" states="confirmed,assigned" string="Process" type="object" icon="gtk-go-forward" help="Done"/>
1173                 </tree>
1174             </field>
1175         </record>
1176
1177         <record id="view_move_picking_tree" model="ir.ui.view">
1178             <field name="name">stock.move.tree</field>
1179             <field name="model">stock.move</field>
1180             <field eval="4" name="priority"/>
1181             <field name="arch" type="xml">
1182                 <tree colors="grey:scrapped == True" string="Stock Moves">
1183                     <field name="product_id"/>
1184                     <field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
1185                     <field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
1186                     <field name="product_uos" groups="product.group_uos"/>
1187                     <field name="location_id" groups="stock.group_locations" invisible="1"/>
1188                     <field name="picking_id" invisible="1" />
1189                     <field name="create_date" invisible="1" />
1190                     <field name="date_expected" invisible="1" />
1191                     <button name="%(stock.move_scrap)d"
1192                        string="Scrap Products" type="action"
1193                        icon="terp-gtk-jump-to-ltr" context="{'scrap': True}"
1194                        states="draft,waiting,confirmed,assigned"
1195                        groups="base.group_user"/>
1196                     <field name="scrapped" invisible="1"/>
1197                     <field name="prodlot_id" groups="stock.group_production_lot"/>
1198                     <button
1199                        name="%(stock.track_line)d"
1200                        string="Split in Serial Number"
1201                        groups="stock.group_production_lot"
1202                        type="action" icon="gtk-justify-fill"
1203                        states="draft,waiting,confirmed,assigned"/>
1204                      <field groups="stock.group_tracking_lot" name="tracking_id"/>
1205                      <button name="setlast_tracking" string="Put in current pack" type="object"
1206                         attrs="{'invisible': [('tracking_id','&lt;&gt;',False)]}"
1207                         icon="terp-accessories-archiver"
1208                         groups="stock.group_tracking_lot"
1209                         states="draft,assigned,confirmed"/>
1210                      <button name="%(split_into)d" string="Put in a new pack" type="action"
1211                         groups="product.group_stock_packaging"
1212                         icon="terp-accessories-archiver+"
1213                         states="draft,assigned,confirmed"/>
1214                       <field name="location_dest_id" groups="stock.group_locations"/>
1215                       <field name="state"/>
1216                 </tree>
1217             </field>
1218         </record>
1219
1220         <record id="view_move_form" model="ir.ui.view">
1221             <field name="name">stock.move.form</field>
1222             <field name="model">stock.move</field>
1223             <field eval="1" name="priority"/>
1224             <field name="arch" type="xml">
1225                 <form string="Stock Moves" version="7.0">
1226                 <header>
1227                     <button name="action_confirm" states="draft" string="Process Later" type="object" class="oe_highlight"/>
1228                     <button name="%(action_partial_move_server)d" string="Process Partially" type="action" states="assigned" class="oe_highlight"/>
1229                     <button name="action_done" states="draft,assigned,confirmed" string="Process Entirely" type="object" class="oe_highlight"/>
1230                     <button name="force_assign" states="confirmed" string="Set Available" type="object" class="oe_highlight"/>
1231                     <button name="action_cancel" states="assigned,confirmed" string="Cancel Move" type="object"/>
1232                     <field name="state" widget="statusbar" statusbar_visible="draft,confirmed,assigned,done" statusbar_colors='{"waiting":"blue","confirmed":"blue"}'/>
1233                 </header>
1234                 <sheet>
1235                     <group>
1236                         <group name="main_grp" string="Details">
1237                             <field name="product_id" on_change="onchange_product_id(product_id,location_id,location_dest_id, False)"/>
1238                             <label for="product_qty"/>
1239                             <div>
1240                                 <field name="product_qty"
1241                                     on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"
1242                                     class="oe_inline"/>
1243                                 <field name="product_uom" groups="product.group_uom" class="oe_inline"/>
1244                                 <button name="%(stock.move_scrap)d"
1245                                         string="Scrap" type="action"
1246                                         icon="terp-gtk-jump-to-ltr" context="{'scrap': True}"
1247                                         states="draft,waiting,confirmed,assigned" colspan="1"/>
1248                             </div>
1249                             <label for="product_uos_qty" groups="product.group_uos"/>
1250                             <div groups="product.group_uos">
1251                                 <field name="product_uos_qty"
1252                                     on_change="onchange_uos_quantity(product_id, product_uos_qty, product_uos, product_uom)"
1253                                     class="oe_inline"/>
1254                                 <field name="product_uos" class="oe_inline"/>
1255                             </div>
1256                             <field name="name"/>
1257                             <field name="company_id" groups="base.group_multi_company" widget="selection"/>
1258                         </group>
1259                         <group name="origin_grp" string="Origin">
1260                             <field name="origin" attrs="{'invisible': [('picking_id', '=', False)]}"/>
1261                             <field name="picking_id" domain="[('type','=',type)]"/>
1262                              <field name="type" on_change="onchange_move_type(type)"/>
1263                             <field name="location_id" groups="stock.group_locations"/>
1264                             <field name="create_date" groups="base.group_no_one"/>
1265                         </group>
1266                         <group name="destination_grp" string="Destination">
1267                             <field name="location_dest_id" groups="stock.group_locations"/>
1268                             <field name="partner_id" context="{'contact_display':'partner'}"
1269                                 groups="stock.group_locations"/>
1270                             <field name="date_expected" on_change="onchange_date(date,date_expected)" attrs="{'invisible': [('state', '=', 'done')]}"/>
1271                             <field name="date" attrs="{'invisible': [('state', '!=', 'done')]}"/>
1272                         </group>
1273                         <group string="Traceability"
1274                             groups="stock.group_tracking_lot">
1275                             <label for="tracking_id" groups="stock.group_tracking_lot"/>
1276                             <div groups="stock.group_tracking_lot">
1277                                 <field name="tracking_id" class="oe_inline"/>
1278                                 <button name="%(split_into)d" string="New Pack" type="action"
1279                                       groups="product.group_stock_packaging"
1280                                       icon="terp-accessories-archiver+"
1281                                       states="draft,assigned,confirmed"/>
1282                             </div>
1283                             <label for="prodlot_id" groups="stock.group_production_lot"/>
1284                             <div groups="stock.group_production_lot">
1285                                 <field name="prodlot_id"
1286                                     context="{'location_id':location_id, 'product_id':product_id}"
1287                                     domain="[('product_id','=?',product_id)]" class="oe_inline"
1288                                     on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id, product_uom)"/>
1289                                 <button name="%(track_line)d"
1290                                     states="draft,waiting,confirmed,assigned"
1291                                     string="Split" type="action" icon="gtk-justify-fill"/>
1292                             </div>
1293                         </group>
1294                     </group>
1295                 </sheet>
1296                 </form>
1297             </field>
1298         </record>
1299
1300         <record id="view_move_picking_form" model="ir.ui.view">
1301             <field name="name">stock.move.form</field>
1302             <field name="model">stock.move</field>
1303             <field eval="2" name="priority"/>
1304             <field name="arch" type="xml">
1305             <form string="Stock Moves" version="7.0">
1306                 <header>
1307                         <button name="force_assign" states="confirmed" string="Force Availability" type="object" groups="base.group_user"/>
1308                         <button name="action_confirm" states="draft" string="Confirm" type="object" groups="base.group_user"/>
1309                         <button name="cancel_assign" states="assigned" string="Cancel Availability" type="object" groups="base.group_user"/>
1310                         <field name="state" widget="statusbar" statusbar_visible="draft,assigned,done"/>
1311                 </header>
1312                 <group>
1313                     <group>
1314                         <field name="name" invisible="1"/>
1315                         <field name="product_id" on_change="onchange_product_id(product_id,location_id,location_dest_id, parent.partner_id)"/>
1316                         <field name="type" invisible="1"/>
1317                         <label for="product_qty"/>
1318                         <div>
1319                             <field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)" class="oe_inline"/>
1320                             <field name="product_uom" string="Unit Of Measure" groups="product.group_uom" class="oe_inline"/>
1321                             <button name="%(stock.move_scrap)d"
1322                                 string="Scrap" type="action"
1323                                 icon="terp-gtk-jump-to-ltr" context="{'scrap': True}"
1324                                 states="draft,waiting,confirmed,assigned"
1325                                 groups="base.group_user"/>
1326                         </div>
1327                             <label for="product_uos_qty" groups="product.group_uos"/>
1328                             <div groups="product.group_uos">
1329                                 <field name="product_uos_qty" on_change="onchange_uos_quantity(product_id, product_uos_qty, product_uos, product_uom)" class="oe_inline"/>
1330                                 <field name="product_uos" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)" class="oe_inline"/>
1331                             </div>
1332                             <field name="product_packaging" groups="product.group_stock_packaging" domain="[('product_id','=',product_id)]"/>
1333                             <field name="partner_id"/>
1334                             </group>
1335                             <group>
1336                                 <field name="create_date" invisible="1"/>
1337                                 <field name="date"/>
1338                                 <field name="date_expected" on_change="onchange_date(date,date_expected)"/>
1339                             </group>
1340
1341                             <group string="Locations" groups="stock.group_locations">
1342                                 <field name="location_id" domain="[('usage','&lt;&gt;','view')]"/>
1343                                 <field name="location_dest_id" domain="[('usage','=','internal')]" groups="stock.group_locations"/>
1344                             </group>
1345
1346                             <group groups="stock.group_tracking_lot" string="Traceability">
1347                                 <label for="tracking_id"/>
1348                                 <div>
1349                                     <field name="tracking_id" groups="stock.group_tracking_lot" class="oe_inline"/>
1350                                       <button name="%(split_into)d" 
1351                                             string="New Pack" type="action"
1352                                             groups="product.group_stock_packaging"
1353                                             icon="terp-accessories-archiver+"
1354                                             states="draft,assigned,confirmed"/>
1355                                  </div>
1356
1357                                   <label for="prodlot_id"/>
1358                                   <div>
1359                                         <field name="prodlot_id" groups="stock.group_production_lot"
1360                                             context="{'location_id':location_id, 'product_id':product_id}"
1361                                             domain="[('product_id','=?',product_id)]"
1362                                             on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id, product_uom)" class="oe_inline"/>
1363                                         <button name="%(track_line)d"
1364                                             groups="stock.group_tracking_lot"
1365                                             states="draft,waiting,confirmed,assigned"
1366                                             string="Split" type="action" icon="gtk-justify-fill"/>
1367                             </div>
1368                         </group>
1369                     </group>
1370                 </form>
1371             </field>
1372         </record>
1373
1374         <record id="view_move_search" model="ir.ui.view">
1375             <field name="name">stock.move.search</field>
1376             <field name="model">stock.move</field>
1377             <field eval="3" name="priority"/>
1378             <field name="arch" type="xml">
1379                 <search string="Stock Moves">
1380                     <field name="origin" filter_domain="['|',('origin','ilike',self),('picking_id','ilike',self)]" string="Reference"/>
1381                     <field name="date" groups="base.group_no_one"/>
1382
1383                     <filter icon="terp-camera_test" string="Ready" name="ready" domain="[('state','=','assigned')]" help="Stock moves that are Available (Ready to process)"/>
1384                     <filter icon="terp-stock" string="To Do" name="future" domain="[('state','in',('assigned','confirmed','waiting'))]" help="Stock moves that are Confirmed, Available or Waiting"/>
1385                     <filter icon="terp-dialog-close" string="Done" name="done" domain="[('state','=','done')]" help="Stock moves that have been processed"/>
1386                     <separator/>
1387                     <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"/>
1388                     <field name="product_id"/>
1389                     <field name="name" string="Location" filter_domain="['|',('location_id','ilike',self),('location_dest_id','ilike',self)]"/>
1390                     <field name="partner_id" string="Partner"  filter_domain="[('picking_id.partner_id','child_of',self)]"/>
1391                     <field name="prodlot_id"/>
1392                     <group expand="0" string="Group By...">
1393                         <filter string="Product" name="by_product" icon="terp-accessories-archiver" domain="[]"  context="{'group_by':'product_id'}"/>
1394                         <filter string="Picking" name="groupby_picking_id" icon="terp-accessories-archiver" domain="[]"  context="{'group_by':'picking_id'}"/>
1395                         <filter string="Serial  Number" name="groupby_prodlot_id" icon="terp-accessories-archiver" domain="[]"  context="{'group_by':'prodlot_id'}"/>
1396                         <filter string="Pack" name="groupby_tracking_id" icon="terp-accessories-archiver" domain="[]"  context="{'group_by':'tracking_id'}"/>
1397                         <filter string="Source" name="groupby_location_id" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'location_id'}" groups="stock.group_locations"/>
1398                         <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"/>
1399                         <filter icon="terp-stock_effects-object-colorize" string="Status" domain="[]" context="{'group_by':'state'}"/>
1400                         <filter string="Creation" name="groupby_create_date" icon="terp-go-month" domain="[]" context="{'group_by':'create_date'}" groups="base.group_no_one"/>
1401                         <filter string="Scheduled" name="groupby_date" icon="terp-go-month" domain="[]" context="{'group_by':'date_expected'}"/>
1402                     </group>
1403                 </search>
1404             </field>
1405         </record>
1406
1407         <record id="action_move_form2" model="ir.actions.act_window">
1408             <field name="name">Stock Moves</field>
1409             <field name="res_model">stock.move</field>
1410             <field name="type">ir.actions.act_window</field>
1411             <field name="view_type">form</field>
1412             <field name="view_id" ref="view_move_tree"/>
1413             <field name="search_view_id" ref="view_move_search"/>
1414             <field name="context">{}</field>
1415             <field name="help" type="html">
1416               <p class="oe_view_nocontent_create">
1417                 Click to create a stock movement.
1418               </p><p>
1419                 This menu gives you the full traceability of inventory
1420                 operations on a specific product. You can filter on the product
1421                 to see all the past or future movements for the product.
1422               </p>
1423             </field>
1424         </record>
1425         
1426         <record model="ir.actions.act_window.view" id="action_stock_move_tree_all">
1427             <field name="sequence" eval="1"/>
1428             <field name="view_mode">tree</field>
1429             <field name="view_id" ref="view_move_tree"/>
1430             <field name="act_window_id" ref="action_move_form2"/>
1431         </record>
1432
1433         <record model="ir.actions.act_window.view" id="action_stock_move_form_all">
1434             <field name="sequence" eval="3"/>
1435             <field name="view_mode">form</field>
1436             <field name="view_id" ref="view_move_form"/>
1437         <field name="act_window_id" ref="action_move_form2"/>
1438         </record>
1439
1440         <menuitem action="action_move_form2" id="menu_action_move_form2" parent="menu_traceability" sequence="3" groups="stock.group_locations"/>
1441
1442         <!--
1443             Reception Picking (By Stock Move)
1444             From stock_partial_move_view
1445         -->
1446         <record id="view_move_tree_reception_picking" model="ir.ui.view">
1447             <field name="name">stock.move.tree2</field>
1448             <field name="model">stock.move</field>
1449             <field name="priority" eval="6"/>
1450             <field name="arch" type="xml">
1451                 <tree colors="grey:state == 'cancel'" string="Moves">
1452                     <field name="date" widget="date"/>
1453                     <field name="picking_id" string="Reference" invisible="1"/>
1454                     <field name="origin"/>
1455                     <field name="partner_id" string="Supplier"/>
1456                     <field name="product_id"/>
1457                     <field name="product_qty"/>
1458                     <field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
1459                     <field name="location_id" invisible="1"/>
1460                     <field name="location_dest_id" invisible="1"/>
1461                     <field name="create_date" invisible="1"/>
1462                     <field name="date_expected" invisible="1"/>
1463                     <button name="%(stock.move_scrap)d"
1464                         string="Scrap Products" type="action"
1465                         icon="terp-gtk-jump-to-ltr" context="{'scrap': True}"
1466                         states="draft,waiting,confirmed,assigned"/>
1467                     <field name="prodlot_id" groups="stock.group_production_lot"/>
1468                     <button name="%(track_line)d" string="Split in Serial Numbers" type="action"
1469                         icon="gtk-justify-fill" attrs="{'invisible': [('prodlot_id','&lt;&gt;',False)]}"
1470                         states="draft,waiting,confirmed,assigned,done"
1471                         groups="stock.group_tracking_lot"/>
1472                     <field name="tracking_id" groups="stock.group_tracking_lot"/>
1473                     <button name="setlast_tracking" string="Put in current pack" type="object"
1474                         attrs="{'invisible': [('tracking_id','&lt;&gt;',False)]}"
1475                         groups="product.group_stock_packaging"
1476                         icon="terp-accessories-archiver"
1477                         states="draft,assigned,confirmed,done"/>
1478                     <button name="%(split_into)d" string="Put in a new pack" type="action"
1479                         groups="product.group_stock_packaging"
1480                         icon="terp-accessories-archiver+"
1481                         states="draft,assigned,confirmed,done"/>
1482                     <field name="state"/>
1483                     <button name="%(action_partial_move_server)d"
1484                         icon="terp-stock_effects-object-colorize" type="action"
1485                         states="assigned" class="oe_highlight"/>
1486                     <button name="action_done" states="draft,assigned,confirmed"
1487                         icon="gtk-go-forward" type="object"
1488                         class="oe_highlight" help="Done"/>
1489                 </tree>
1490             </field>
1491         </record>
1492
1493         <!-- test -->
1494         <record id="view_move_tree_reception_picking_board" model="ir.ui.view">
1495             <field name="name">stock.move.tree3</field>
1496             <field name="model">stock.move</field>
1497             <field eval="6" name="priority"/>
1498             <field name="arch" type="xml">
1499                 <tree string="Moves">
1500                     <field name="picking_id" string="Reference"/>
1501                     <field name="product_id"/>
1502                     <field name="product_qty"/>
1503                     <field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
1504                     <field name="date" groups="base.group_no_one"/>
1505                 </tree>
1506             </field>
1507         </record>
1508
1509         <record id="action_reception_picking_move" model="ir.actions.act_window">
1510             <field name="name">Incoming  Products</field>
1511             <field name="res_model">stock.move</field>
1512             <field name="type">ir.actions.act_window</field>
1513             <field name="view_type">form</field>
1514             <field name="view_mode">tree,form</field>
1515             <field name="domain">['|','&amp;',('picking_id','=',False),('location_id.usage', 'in', ['customer','supplier']),'&amp;',('picking_id','!=',False),('picking_id.type','=','in')]</field>
1516             <field name="view_id" ref="view_move_tree_reception_picking"/>
1517             <field name="context">{'product_receive': True, 'search_default_future': True, 'picking_type': 'in'}</field>
1518             <field name="help" type="html">
1519               <p class="oe_view_nocontent_create">
1520                 Click to register a product reception. 
1521               </p><p>
1522                 Here you can receive individual products, no matter what
1523                 purchase order or picking order they come from. You will find
1524                 the list of all products you are waiting for. Once you receive
1525                 an order, you can filter based on the name of the supplier or
1526                 the purchase order reference. Then you can confirm all products
1527                 received using the buttons on the right of each line.
1528               </p>
1529             </field>
1530         </record>
1531
1532         <record model="ir.actions.act_window.view" id="action_move_reception_picking_tree">
1533             <field name="sequence" eval="1"/>
1534             <field name="view_mode">tree</field>
1535             <field name="view_id" ref="view_move_tree_reception_picking"/>
1536             <field name="act_window_id" ref="action_reception_picking_move"/>
1537         </record>
1538         <record model="ir.actions.act_window.view" id="action_move_reception_picking_form">
1539             <field name="sequence" eval="2"/>
1540             <field name="view_mode">form</field>
1541             <field name="view_id" ref="view_move_form"/>
1542             <field name="act_window_id" ref="action_reception_picking_move"/>
1543         </record>
1544
1545         <!-- Stock incoterms -->
1546         <record id="view_incoterms_tree" model="ir.ui.view">
1547             <field name="name">stock.incoterms.tree</field>
1548             <field name="model">stock.incoterms</field>
1549             <field name="arch" type="xml">
1550                 <tree string="Incoterms">
1551                     <field name="code"/>
1552                     <field colspan="4" name="name"/>
1553                 </tree>
1554             </field>
1555         </record>
1556         <record id="stock_incoterms_form" model="ir.ui.view">
1557             <field name="name">stock.incoterms.form</field>
1558             <field name="model">stock.incoterms</field>
1559             <field name="arch" type="xml">
1560                 <form string="Incoterms" version="7.0">
1561                     <sheet>
1562                         <field name="name"/>
1563                         <field name="code"/>
1564                         <field name="active"/>
1565                     </sheet>
1566                 </form>
1567             </field>
1568         </record>
1569         <record id="action_incoterms_tree" model="ir.actions.act_window">
1570             <field name="name">Incoterms</field>
1571             <field name="res_model">stock.incoterms</field>
1572             <field name="type">ir.actions.act_window</field>
1573             <field name="view_type">form</field>
1574             <field name="view_mode">tree,form</field>
1575         </record>
1576
1577         <menuitem action="action_incoterms_tree" id="menu_action_incoterm_open" parent="menu_warehouse_config" sequence="1"/>
1578
1579         <act_window
1580             context="{'location': active_id}"
1581             domain="[('type','&lt;&gt;','service')]"
1582             id="act_product_location_open"
1583             name="Products"
1584             res_model="product.product"
1585             src_model="stock.location"/>
1586
1587         <record id="ir_act_product_location_open" model="ir.values">
1588             <field name="key2">tree_but_open</field>
1589             <field name="model">stock.location</field>
1590             <field name="name">Products</field>
1591             <field eval="'ir.actions.act_window,%d'%act_product_location_open" name="value"/>
1592         </record>
1593
1594
1595         <record id="ir_act_product_location_open" model="ir.values">
1596             <field name="key2">tree_but_open</field>
1597             <field name="model">stock.location</field>
1598             <field name="name">Open Products</field>
1599             <field eval="'ir.actions.act_window,%d'%action_view_stock_location_product" name="value"/>
1600         </record>
1601         <record id="action_picking_tree_out" model="ir.actions.act_window">
1602             <field name="name">Customers Packings</field>
1603             <field name="res_model">stock.picking</field>
1604             <field name="type">ir.actions.act_window</field>
1605             <field name="view_type">form</field>
1606             <field name="view_mode">tree,form,calendar</field>
1607             <field name="domain">[('type','=','out')]</field>
1608             <field name="context">{'default_type': 'out', 'contact_display': 'partner',"search_default_available":1}</field>
1609             <field name="search_view_id" ref="view_picking_in_search"/>
1610         </record>
1611         <record id="action_invoice_tree5_out" model="ir.actions.act_window.view">
1612             <field eval="1" name="sequence"/>
1613             <field name="view_mode">tree</field>
1614             <field name="view_id" ref="view_picking_in_tree"/>
1615             <field name="act_window_id" ref="action_picking_tree_out"/>
1616         </record>
1617         <record id="action_invoice_tree5_view2_out" model="ir.actions.act_window.view">
1618             <field eval="2" name="sequence"/>
1619             <field name="view_mode">form</field>
1620             <field name="view_id" ref="view_picking_in_form"/>
1621             <field name="act_window_id" ref="action_picking_tree_out"/>
1622         </record>
1623         <record id="action_invoice_tree5_viewout_cal" model="ir.actions.act_window.view">
1624             <field eval="3" name="sequence"/>
1625             <field name="view_mode">calendar</field>
1626             <field name="act_window_id" ref="action_picking_tree_out"/>
1627         </record>
1628
1629         <record id="action_out_picking_move" model="ir.actions.act_window">
1630             <field name="name">Deliver Products</field>
1631             <field name="res_model">stock.move</field>
1632             <field name="type">ir.actions.act_window</field>
1633             <field name="view_type">form</field>
1634             <field name="view_mode">tree,form</field>
1635             <field name="domain">['|','&amp;',('picking_id','=',False),('location_dest_id.usage', 'in', ['customer','supplier']),'&amp;',('picking_id','!=',False),('picking_id.type','=','out')]</field>
1636             <field name="view_id" ref="view_move_tree_reception_picking"/>
1637             <field name="context">{'picking_type': 'out', 'search_default_future': True}</field>
1638             <field name="help" type="html">
1639               <p class="oe_view_nocontent_create">
1640                 Click to register a product delivery.
1641               </p>
1642               <p>
1643                 You will find in this list all products you have to deliver to
1644                 your customers. You can process the deliveries directly from
1645                 this list using the buttons on the right of each line. You can
1646                 filter the products to deliver by customer, products or sale
1647                 order (using the Origin field).
1648               </p>
1649             </field>
1650         </record>
1651
1652         <record model="ir.actions.act_window.view" id="action_move_out_picking_tree">
1653             <field name="sequence" eval="1"/>
1654             <field name="view_mode">tree</field>
1655             <field name="view_id" ref="view_move_tree_reception_picking"/>
1656             <field name="act_window_id" ref="action_out_picking_move"/>
1657         </record>
1658         <record model="ir.actions.act_window.view" id="action_move_out_picking_form">
1659             <field name="sequence" eval="2"/>
1660             <field name="view_mode">form</field>
1661             <field name="view_id" ref="view_move_form"/>
1662             <field name="act_window_id" ref="action_out_picking_move"/>
1663         </record>
1664
1665       <menuitem action="action_reception_picking_move" id="menu_action_pdct_in" parent="menu_stock_products_moves" sequence="1"/>
1666       <menuitem action="action_out_picking_move" id="menu_action_pdct_out" parent="menu_stock_products_moves" sequence="2"/>
1667
1668
1669          <record id="view_stock_journal_filter" model="ir.ui.view">
1670             <field name="name">stock.journal.filter</field>
1671             <field name="model">stock.journal</field>
1672             <field name="arch" type="xml">
1673                 <search string="Stock Journal">
1674                     <field name="name" string="Stock Journal"/>
1675                     <field name="user_id"/>
1676                 </search>
1677             </field>
1678         </record>
1679         <record model="ir.ui.view" id="view_stock_journal_tree">
1680             <field name="name">Stock Journals</field>
1681             <field name="model">stock.journal</field>
1682             <field name="arch" type="xml">
1683                 <tree string="Stock Journal">
1684                     <field name="name"/>
1685                     <field name="user_id"/>
1686                 </tree>
1687             </field>
1688         </record>
1689         <record model="ir.ui.view" id="view_stock_journal_form">
1690             <field name="name">Stock Journals</field>
1691             <field name="model">stock.journal</field>
1692             <field name="arch" type="xml">
1693                 <form string="Stock Journal" version="7.0">
1694                     <sheet>
1695                         <field name="name"/>
1696                         <field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'account.group_account_invoice', 'stock.group_stock_manager']}"/>
1697                     </sheet>
1698                 </form>
1699             </field>
1700         </record>
1701         <record id="action_stock_journal_form" model="ir.actions.act_window">
1702             <field name="name">Stock Journals</field>
1703             <field name="res_model">stock.journal</field>
1704             <field name="type">ir.actions.act_window</field>
1705             <field name="view_type">form</field>
1706             <field name="help" type="html">
1707               <p class="oe_view_nocontent_create">
1708                 Click to create a new journal. 
1709               </p><p>
1710                 The stock journal system allows you to assign each stock
1711                 operation to a specific journal according to the type of
1712                 operation to perform or the worker/team that should perform the
1713                 operation. Examples of stock journals may be: quality control,
1714                 pick lists, packing, etc.
1715               </p>
1716             </field>
1717         </record>
1718         <menuitem
1719             action="action_stock_journal_form"
1720             id="menu_action_stock_journal_form"
1721             parent="menu_warehouse_config" sequence="1"/>
1722
1723     </data>
1724 </openerp>