[MERGE] forward port of branch 7.0 up to 9b1cdea
[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" string="Stock Move" 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" string="Stock Move" 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" string="Stock Move" 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_qty" groups="product.group_uos"/>
1149                     <field name="product_uos" groups="product.group_uos"/>
1150                     <button name="%(stock.move_scrap)d"
1151                         string="Scrap Products" type="action"
1152                         icon="terp-gtk-jump-to-ltr" context="{'scrap': True}"
1153                         states="draft,waiting,confirmed,assigned"/>
1154                     <field name="prodlot_id" groups="stock.group_production_lot"/>
1155                     <button name="%(track_line)d" string="Split in Serial Numbers" type="action"
1156                         icon="gtk-justify-fill" attrs="{'invisible': [('prodlot_id','&lt;&gt;',False)]}"
1157                         states="draft,waiting,confirmed,assigned,done"
1158                         groups="stock.group_tracking_lot"/>
1159                     <field name="tracking_id" groups="stock.group_tracking_lot"/>
1160                     <button name="setlast_tracking" string="Put in current pack" type="object"
1161                         groups="product.group_stock_packaging"
1162                         icon="terp-accessories-archiver" attrs="{'invisible': [('tracking_id','&lt;&gt;',False)]}"
1163                         states="draft,assigned,confirmed,done"/>
1164                     <button name="%(split_into)d" string="Put in a new pack" type="action"
1165                         groups="product.group_stock_packaging"
1166                         icon="terp-accessories-archiver+"
1167                         states="draft,assigned,confirmed,done"/>
1168                     <field name="location_id" groups="stock.group_locations"/>
1169                     <field name="location_dest_id" groups="stock.group_locations"/>
1170                     <field name="date" groups="base.group_no_one"/>
1171                     <field name="date_expected"/>
1172                     <field name="state"/>
1173                     <button name="action_done" states="confirmed,assigned" string="Process" type="object" icon="gtk-go-forward" help="Done"/>
1174                 </tree>
1175             </field>
1176         </record>
1177
1178         <record id="view_move_picking_tree" model="ir.ui.view">
1179             <field name="name">stock.move.tree</field>
1180             <field name="model">stock.move</field>
1181             <field eval="4" name="priority"/>
1182             <field name="arch" type="xml">
1183                 <tree colors="grey:scrapped == True" string="Stock Moves">
1184                     <field name="product_id"/>
1185                     <field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
1186                     <field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
1187                     <field name="product_uos_qty" groups="product.group_uos"/>
1188                     <field name="product_uos" groups="product.group_uos"/>
1189                     <field name="location_id" groups="stock.group_locations" invisible="1"/>
1190                     <field name="picking_id" invisible="1" />
1191                     <field name="create_date" invisible="1" />
1192                     <field name="date_expected" invisible="1" />
1193                     <button name="%(stock.move_scrap)d"
1194                        string="Scrap Products" type="action"
1195                        icon="terp-gtk-jump-to-ltr" context="{'scrap': True}"
1196                        states="draft,waiting,confirmed,assigned"
1197                        groups="base.group_user"/>
1198                     <field name="scrapped" invisible="1"/>
1199                     <field name="prodlot_id" groups="stock.group_production_lot"/>
1200                     <button
1201                        name="%(stock.track_line)d"
1202                        string="Split in Serial Number"
1203                        groups="stock.group_production_lot"
1204                        type="action" icon="gtk-justify-fill"
1205                        states="draft,waiting,confirmed,assigned"/>
1206                      <field groups="stock.group_tracking_lot" name="tracking_id"/>
1207                      <button name="setlast_tracking" string="Put in current pack" type="object"
1208                         attrs="{'invisible': [('tracking_id','&lt;&gt;',False)]}"
1209                         icon="terp-accessories-archiver"
1210                         groups="stock.group_tracking_lot"
1211                         states="draft,assigned,confirmed"/>
1212                      <button name="%(split_into)d" string="Put in a new pack" type="action"
1213                         groups="product.group_stock_packaging"
1214                         icon="terp-accessories-archiver+"
1215                         states="draft,assigned,confirmed"/>
1216                       <field name="location_dest_id" groups="stock.group_locations"/>
1217                       <field name="state"/>
1218                 </tree>
1219             </field>
1220         </record>
1221
1222         <record id="view_move_form" model="ir.ui.view">
1223             <field name="name">stock.move.form</field>
1224             <field name="model">stock.move</field>
1225             <field eval="1" name="priority"/>
1226             <field name="arch" type="xml">
1227                 <form string="Stock Moves" version="7.0">
1228                 <header>
1229                     <button name="action_confirm" states="draft" string="Process Later" type="object" class="oe_highlight"/>
1230                     <button name="%(action_partial_move_server)d" string="Process Partially" type="action" states="assigned" class="oe_highlight"/>
1231                     <button name="action_done" states="draft,assigned,confirmed" string="Process Entirely" type="object" class="oe_highlight"/>
1232                     <button name="force_assign" states="confirmed" string="Set Available" type="object" class="oe_highlight"/>
1233                     <button name="action_cancel" states="assigned,confirmed" string="Cancel Move" type="object"/>
1234                     <field name="state" widget="statusbar" statusbar_visible="draft,confirmed,assigned,done" statusbar_colors='{"waiting":"blue","confirmed":"blue"}'/>
1235                 </header>
1236                 <sheet>
1237                     <group>
1238                         <group name="main_grp" string="Details">
1239                             <field name="product_id" on_change="onchange_product_id(product_id,location_id,location_dest_id, False)"/>
1240                             <label for="product_qty"/>
1241                             <div>
1242                                 <field name="product_qty"
1243                                     on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"
1244                                     class="oe_inline"/>
1245                                 <field name="product_uom" groups="product.group_uom" class="oe_inline"/>
1246                                 <button name="%(stock.move_scrap)d"
1247                                         string="Scrap" type="action"
1248                                         icon="terp-gtk-jump-to-ltr" context="{'scrap': True}"
1249                                         states="draft,waiting,confirmed,assigned" colspan="1"/>
1250                             </div>
1251                             <label for="product_uos_qty" groups="product.group_uos"/>
1252                             <div groups="product.group_uos">
1253                                 <field name="product_uos_qty"
1254                                     on_change="onchange_uos_quantity(product_id, product_uos_qty, product_uos, product_uom)"
1255                                     class="oe_inline"/>
1256                                 <field name="product_uos" class="oe_inline"/>
1257                             </div>
1258                             <field name="name"/>
1259                             <field name="company_id" groups="base.group_multi_company" widget="selection"/>
1260                         </group>
1261                         <group name="origin_grp" string="Origin">
1262                             <field name="origin" attrs="{'invisible': [('picking_id', '=', False)]}"/>
1263                             <field name="picking_id" domain="[('type','=',type)]"/>
1264                              <field name="type" on_change="onchange_move_type(type)"/>
1265                             <field name="location_id" groups="stock.group_locations"/>
1266                             <field name="create_date" groups="base.group_no_one"/>
1267                         </group>
1268                         <group name="destination_grp" string="Destination">
1269                             <field name="location_dest_id" groups="stock.group_locations"/>
1270                             <field name="partner_id" context="{'contact_display':'partner'}"
1271                                 groups="stock.group_locations"/>
1272                             <field name="date_expected" on_change="onchange_date(date,date_expected)" attrs="{'invisible': [('state', '=', 'done')]}"/>
1273                             <field name="date" attrs="{'invisible': [('state', '!=', 'done')]}"/>
1274                         </group>
1275                         <group string="Traceability"
1276                             groups="stock.group_tracking_lot,stock.group_production_lot">
1277                             <label for="tracking_id" groups="stock.group_tracking_lot"/>
1278                             <div groups="stock.group_tracking_lot">
1279                                 <field name="tracking_id" class="oe_inline"/>
1280                                 <button name="%(split_into)d" string="New Pack" type="action"
1281                                       groups="product.group_stock_packaging"
1282                                       icon="terp-accessories-archiver+"
1283                                       states="draft,assigned,confirmed"/>
1284                             </div>
1285                             <label for="prodlot_id" groups="stock.group_production_lot"/>
1286                             <div groups="stock.group_production_lot">
1287                                 <field name="prodlot_id"
1288                                     context="{'location_id':location_id, 'product_id':product_id}"
1289                                     domain="[('product_id','=?',product_id)]" class="oe_inline"
1290                                     on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id, product_uom)"/>
1291                                 <button name="%(track_line)d"
1292                                     states="draft,waiting,confirmed,assigned"
1293                                     string="Split" type="action" icon="gtk-justify-fill"/>
1294                             </div>
1295                         </group>
1296                     </group>
1297                 </sheet>
1298                 </form>
1299             </field>
1300         </record>
1301
1302         <record id="view_move_picking_form" model="ir.ui.view">
1303             <field name="name">stock.move.form</field>
1304             <field name="model">stock.move</field>
1305             <field eval="2" name="priority"/>
1306             <field name="arch" type="xml">
1307             <form string="Stock Moves" version="7.0">
1308                 <header>
1309                         <button name="force_assign" states="confirmed" string="Force Availability" type="object" groups="base.group_user"/>
1310                         <button name="action_confirm" states="draft" string="Confirm" type="object" groups="base.group_user"/>
1311                         <button name="cancel_assign" states="assigned" string="Cancel Availability" type="object" groups="base.group_user"/>
1312                         <field name="state" widget="statusbar" statusbar_visible="draft,assigned,done"/>
1313                 </header>
1314                 <group>
1315                     <group>
1316                         <field name="name" invisible="1"/>
1317                         <field name="product_id" on_change="onchange_product_id(product_id,location_id,location_dest_id, parent.partner_id)"/>
1318                         <field name="type" invisible="1"/>
1319                         <label for="product_qty"/>
1320                         <div>
1321                             <field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)" class="oe_inline"/>
1322                             <field name="product_uom" string="Unit Of Measure" groups="product.group_uom" class="oe_inline"/>
1323                             <button name="%(stock.move_scrap)d"
1324                                 string="Scrap" type="action"
1325                                 icon="terp-gtk-jump-to-ltr" context="{'scrap': True}"
1326                                 states="draft,waiting,confirmed,assigned"
1327                                 groups="base.group_user"/>
1328                         </div>
1329                             <label for="product_uos_qty" groups="product.group_uos"/>
1330                             <div groups="product.group_uos">
1331                                 <field name="product_uos_qty" on_change="onchange_uos_quantity(product_id, product_uos_qty, product_uos, product_uom)" class="oe_inline"/>
1332                                 <field name="product_uos" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)" class="oe_inline"/>
1333                             </div>
1334                             <field name="product_packaging" groups="product.group_stock_packaging" domain="[('product_id','=',product_id)]"/>
1335                             <field name="partner_id"/>
1336                             </group>
1337                             <group>
1338                                 <field name="create_date" invisible="1"/>
1339                                 <field name="date"/>
1340                                 <field name="date_expected" on_change="onchange_date(date,date_expected)"/>
1341                             </group>
1342
1343                             <group string="Locations" groups="stock.group_locations">
1344                                 <field name="location_id" domain="[('usage','&lt;&gt;','view')]"/>
1345                                 <field name="location_dest_id" domain="[('usage','in', ['internal', 'supplier', 'customer'])]" groups="stock.group_locations"/>
1346                             </group>
1347
1348                             <group groups="stock.group_tracking_lot" string="Traceability">
1349                                 <label for="tracking_id"/>
1350                                 <div>
1351                                     <field name="tracking_id" groups="stock.group_tracking_lot" class="oe_inline"/>
1352                                       <button name="%(split_into)d" 
1353                                             string="New Pack" type="action"
1354                                             groups="product.group_stock_packaging"
1355                                             icon="terp-accessories-archiver+"
1356                                             states="draft,assigned,confirmed"/>
1357                                  </div>
1358
1359                                   <label for="prodlot_id"/>
1360                                   <div>
1361                                         <field name="prodlot_id" groups="stock.group_production_lot"
1362                                             context="{'location_id':location_id, 'product_id':product_id}"
1363                                             domain="[('product_id','=?',product_id)]"
1364                                             on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id, product_uom)" class="oe_inline"/>
1365                                         <button name="%(track_line)d"
1366                                             groups="stock.group_tracking_lot"
1367                                             states="draft,waiting,confirmed,assigned"
1368                                             string="Split" type="action" icon="gtk-justify-fill"/>
1369                             </div>
1370                         </group>
1371                     </group>
1372                 </form>
1373             </field>
1374         </record>
1375
1376         <record id="view_move_search" model="ir.ui.view">
1377             <field name="name">stock.move.search</field>
1378             <field name="model">stock.move</field>
1379             <field eval="3" name="priority"/>
1380             <field name="arch" type="xml">
1381                 <search string="Stock Moves">
1382                     <field name="origin" filter_domain="['|',('origin','ilike',self),('picking_id','ilike',self)]" string="Reference"/>
1383                     <field name="date" groups="base.group_no_one"/>
1384
1385                     <filter icon="terp-camera_test" string="Ready" name="ready" domain="[('state','=','assigned')]" help="Stock moves that are Available (Ready to process)"/>
1386                     <filter icon="terp-stock" string="To Do" name="future" domain="[('state','in',('assigned','confirmed','waiting'))]" help="Stock moves that are Confirmed, Available or Waiting"/>
1387                     <filter icon="terp-dialog-close" string="Done" name="done" domain="[('state','=','done')]" help="Stock moves that have been processed"/>
1388                     <separator/>
1389                     <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"/>
1390                     <field name="product_id"/>
1391                     <field name="name" string="Location" filter_domain="['|',('location_id','ilike',self),('location_dest_id','ilike',self)]"/>
1392                     <field name="partner_id" string="Partner"  filter_domain="[('picking_id.partner_id','child_of',self)]"/>
1393                     <field name="prodlot_id"/>
1394                     <group expand="0" string="Group By...">
1395                         <filter string="Product" name="by_product" icon="terp-accessories-archiver" domain="[]"  context="{'group_by':'product_id'}"/>
1396                         <filter string="Picking" name="groupby_picking_id" icon="terp-accessories-archiver" domain="[]"  context="{'group_by':'picking_id'}"/>
1397                         <filter string="Serial  Number" name="groupby_prodlot_id" icon="terp-accessories-archiver" domain="[]"  context="{'group_by':'prodlot_id'}"/>
1398                         <filter string="Pack" name="groupby_tracking_id" icon="terp-accessories-archiver" domain="[]"  context="{'group_by':'tracking_id'}"/>
1399                         <filter string="Source" name="groupby_location_id" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'location_id'}" groups="stock.group_locations"/>
1400                         <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"/>
1401                         <filter icon="terp-stock_effects-object-colorize" string="Status" domain="[]" context="{'group_by':'state'}"/>
1402                         <filter string="Creation" name="groupby_create_date" icon="terp-go-month" domain="[]" context="{'group_by':'create_date'}" groups="base.group_no_one"/>
1403                         <filter string="Scheduled" name="groupby_date" icon="terp-go-month" domain="[]" context="{'group_by':'date_expected'}"/>
1404                     </group>
1405                 </search>
1406             </field>
1407         </record>
1408
1409         <record id="action_move_form2" model="ir.actions.act_window">
1410             <field name="name">Stock Moves</field>
1411             <field name="res_model">stock.move</field>
1412             <field name="type">ir.actions.act_window</field>
1413             <field name="view_type">form</field>
1414             <field name="view_id" ref="view_move_tree"/>
1415             <field name="search_view_id" ref="view_move_search"/>
1416             <field name="context">{}</field>
1417             <field name="help" type="html">
1418               <p class="oe_view_nocontent_create">
1419                 Click to create a stock movement.
1420               </p><p>
1421                 This menu gives you the full traceability of inventory
1422                 operations on a specific product. You can filter on the product
1423                 to see all the past or future movements for the product.
1424               </p>
1425             </field>
1426         </record>
1427         
1428         <record model="ir.actions.act_window.view" id="action_stock_move_tree_all">
1429             <field name="sequence" eval="1"/>
1430             <field name="view_mode">tree</field>
1431             <field name="view_id" ref="view_move_tree"/>
1432             <field name="act_window_id" ref="action_move_form2"/>
1433         </record>
1434
1435         <record model="ir.actions.act_window.view" id="action_stock_move_form_all">
1436             <field name="sequence" eval="3"/>
1437             <field name="view_mode">form</field>
1438             <field name="view_id" ref="view_move_form"/>
1439         <field name="act_window_id" ref="action_move_form2"/>
1440         </record>
1441
1442         <menuitem action="action_move_form2" id="menu_action_move_form2" parent="menu_traceability" sequence="3" groups="stock.group_locations"/>
1443
1444         <!--
1445             Reception Picking (By Stock Move)
1446             From stock_partial_move_view
1447         -->
1448         <record id="view_move_tree_reception_picking" model="ir.ui.view">
1449             <field name="name">stock.move.tree2</field>
1450             <field name="model">stock.move</field>
1451             <field name="priority" eval="6"/>
1452             <field name="arch" type="xml">
1453                 <tree colors="grey:state == 'cancel'" string="Moves">
1454                     <field name="date" widget="date"/>
1455                     <field name="picking_id" string="Reference" invisible="1"/>
1456                     <field name="origin"/>
1457                     <field name="partner_id" string="Supplier"/>
1458                     <field name="product_id"/>
1459                     <field name="product_qty"/>
1460                     <field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
1461                     <field name="location_id" invisible="1"/>
1462                     <field name="location_dest_id" invisible="1"/>
1463                     <field name="create_date" invisible="1"/>
1464                     <field name="date_expected" invisible="1"/>
1465                     <button name="%(stock.move_scrap)d"
1466                         string="Scrap Products" type="action"
1467                         icon="terp-gtk-jump-to-ltr" context="{'scrap': True}"
1468                         states="draft,waiting,confirmed,assigned"/>
1469                     <field name="prodlot_id" groups="stock.group_production_lot"/>
1470                     <button name="%(track_line)d" string="Split in Serial Numbers" type="action"
1471                         icon="gtk-justify-fill" attrs="{'invisible': [('prodlot_id','&lt;&gt;',False)]}"
1472                         states="draft,waiting,confirmed,assigned,done"
1473                         groups="stock.group_tracking_lot"/>
1474                     <field name="tracking_id" groups="stock.group_tracking_lot"/>
1475                     <button name="setlast_tracking" string="Put in current pack" type="object"
1476                         attrs="{'invisible': [('tracking_id','&lt;&gt;',False)]}"
1477                         groups="product.group_stock_packaging"
1478                         icon="terp-accessories-archiver"
1479                         states="draft,assigned,confirmed,done"/>
1480                     <button name="%(split_into)d" string="Put in a new pack" type="action"
1481                         groups="product.group_stock_packaging"
1482                         icon="terp-accessories-archiver+"
1483                         states="draft,assigned,confirmed,done"/>
1484                     <field name="state"/>
1485                     <button name="%(action_partial_move_server)d"
1486                         icon="terp-stock_effects-object-colorize" type="action"
1487                         states="assigned" class="oe_highlight"/>
1488                     <button name="action_done" states="draft,assigned,confirmed"
1489                         icon="gtk-go-forward" type="object"
1490                         class="oe_highlight" help="Done"/>
1491                 </tree>
1492             </field>
1493         </record>
1494
1495         <!-- test -->
1496         <record id="view_move_tree_reception_picking_board" model="ir.ui.view">
1497             <field name="name">stock.move.tree3</field>
1498             <field name="model">stock.move</field>
1499             <field eval="6" name="priority"/>
1500             <field name="arch" type="xml">
1501                 <tree string="Moves">
1502                     <field name="picking_id" string="Reference"/>
1503                     <field name="product_id"/>
1504                     <field name="product_qty"/>
1505                     <field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
1506                     <field name="date" groups="base.group_no_one"/>
1507                 </tree>
1508             </field>
1509         </record>
1510
1511         <record id="action_reception_picking_move" model="ir.actions.act_window">
1512             <field name="name">Incoming  Products</field>
1513             <field name="res_model">stock.move</field>
1514             <field name="type">ir.actions.act_window</field>
1515             <field name="view_type">form</field>
1516             <field name="view_mode">tree,form</field>
1517             <field name="domain">['|','&amp;',('picking_id','=',False),('location_id.usage', 'in', ['customer','supplier']),'&amp;',('picking_id','!=',False),('picking_id.type','=','in')]</field>
1518             <field name="view_id" ref="view_move_tree_reception_picking"/>
1519             <field name="context">{'product_receive': True, 'search_default_future': True, 'picking_type': 'in'}</field>
1520             <field name="help" type="html">
1521               <p class="oe_view_nocontent_create">
1522                 Click to register a product reception. 
1523               </p><p>
1524                 Here you can receive individual products, no matter what
1525                 purchase order or picking order they come from. You will find
1526                 the list of all products you are waiting for. Once you receive
1527                 an order, you can filter based on the name of the supplier or
1528                 the purchase order reference. Then you can confirm all products
1529                 received using the buttons on the right of each line.
1530               </p>
1531             </field>
1532         </record>
1533
1534         <record model="ir.actions.act_window.view" id="action_move_reception_picking_tree">
1535             <field name="sequence" eval="1"/>
1536             <field name="view_mode">tree</field>
1537             <field name="view_id" ref="view_move_tree_reception_picking"/>
1538             <field name="act_window_id" ref="action_reception_picking_move"/>
1539         </record>
1540         <record model="ir.actions.act_window.view" id="action_move_reception_picking_form">
1541             <field name="sequence" eval="2"/>
1542             <field name="view_mode">form</field>
1543             <field name="view_id" ref="view_move_form"/>
1544             <field name="act_window_id" ref="action_reception_picking_move"/>
1545         </record>
1546
1547         <!-- Stock incoterms -->
1548         <record id="view_incoterms_tree" model="ir.ui.view">
1549             <field name="name">stock.incoterms.tree</field>
1550             <field name="model">stock.incoterms</field>
1551             <field name="arch" type="xml">
1552                 <tree string="Incoterms">
1553                     <field name="code"/>
1554                     <field colspan="4" name="name"/>
1555                 </tree>
1556             </field>
1557         </record>
1558         <record id="stock_incoterms_form" model="ir.ui.view">
1559             <field name="name">stock.incoterms.form</field>
1560             <field name="model">stock.incoterms</field>
1561             <field name="arch" type="xml">
1562                 <form string="Incoterms" version="7.0">
1563                     <group>
1564                         <field name="name"/>
1565                         <field name="code"/>
1566                         <field name="active"/>
1567                     </group>
1568                 </form>
1569             </field>
1570         </record>
1571         <record id="action_incoterms_tree" model="ir.actions.act_window">
1572             <field name="name">Incoterms</field>
1573             <field name="res_model">stock.incoterms</field>
1574             <field name="type">ir.actions.act_window</field>
1575             <field name="view_type">form</field>
1576             <field name="view_mode">tree,form</field>
1577         </record>
1578
1579         <menuitem action="action_incoterms_tree" id="menu_action_incoterm_open" parent="menu_warehouse_config" sequence="1"/>
1580
1581         <act_window
1582             context="{'location': active_id}"
1583             domain="[('type','&lt;&gt;','service')]"
1584             id="act_product_location_open"
1585             name="Products"
1586             res_model="product.product"
1587             src_model="stock.location"/>
1588
1589         <record id="ir_act_product_location_open" model="ir.values">
1590             <field name="key2">tree_but_open</field>
1591             <field name="model">stock.location</field>
1592             <field name="name">Products</field>
1593             <field eval="'ir.actions.act_window,%d'%act_product_location_open" name="value"/>
1594         </record>
1595
1596
1597         <record id="ir_act_product_location_open" model="ir.values">
1598             <field name="key2">tree_but_open</field>
1599             <field name="model">stock.location</field>
1600             <field name="name">Open Products</field>
1601             <field eval="'ir.actions.act_window,%d'%action_view_stock_location_product" name="value"/>
1602         </record>
1603         <record id="action_picking_tree_out" model="ir.actions.act_window">
1604             <field name="name">Customers Packings</field>
1605             <field name="res_model">stock.picking</field>
1606             <field name="type">ir.actions.act_window</field>
1607             <field name="view_type">form</field>
1608             <field name="view_mode">tree,form,calendar</field>
1609             <field name="domain">[('type','=','out')]</field>
1610             <field name="context">{'default_type': 'out', 'contact_display': 'partner',"search_default_available":1}</field>
1611             <field name="search_view_id" ref="view_picking_in_search"/>
1612         </record>
1613         <record id="action_invoice_tree5_out" model="ir.actions.act_window.view">
1614             <field eval="1" name="sequence"/>
1615             <field name="view_mode">tree</field>
1616             <field name="view_id" ref="view_picking_in_tree"/>
1617             <field name="act_window_id" ref="action_picking_tree_out"/>
1618         </record>
1619         <record id="action_invoice_tree5_view2_out" model="ir.actions.act_window.view">
1620             <field eval="2" name="sequence"/>
1621             <field name="view_mode">form</field>
1622             <field name="view_id" ref="view_picking_in_form"/>
1623             <field name="act_window_id" ref="action_picking_tree_out"/>
1624         </record>
1625         <record id="action_invoice_tree5_viewout_cal" model="ir.actions.act_window.view">
1626             <field eval="3" name="sequence"/>
1627             <field name="view_mode">calendar</field>
1628             <field name="act_window_id" ref="action_picking_tree_out"/>
1629         </record>
1630
1631         <record id="action_out_picking_move" model="ir.actions.act_window">
1632             <field name="name">Deliver Products</field>
1633             <field name="res_model">stock.move</field>
1634             <field name="type">ir.actions.act_window</field>
1635             <field name="view_type">form</field>
1636             <field name="view_mode">tree,form</field>
1637             <field name="domain">['|','&amp;',('picking_id','=',False),('location_dest_id.usage', 'in', ['customer','supplier']),'&amp;',('picking_id','!=',False),('picking_id.type','=','out')]</field>
1638             <field name="view_id" ref="view_move_tree_reception_picking"/>
1639             <field name="context">{'picking_type': 'out', 'search_default_future': True}</field>
1640             <field name="help" type="html">
1641               <p class="oe_view_nocontent_create">
1642                 Click to register a product delivery.
1643               </p>
1644               <p>
1645                 You will find in this list all products you have to deliver to
1646                 your customers. You can process the deliveries directly from
1647                 this list using the buttons on the right of each line. You can
1648                 filter the products to deliver by customer, products or sale
1649                 order (using the Origin field).
1650               </p>
1651             </field>
1652         </record>
1653
1654         <record model="ir.actions.act_window.view" id="action_move_out_picking_tree">
1655             <field name="sequence" eval="1"/>
1656             <field name="view_mode">tree</field>
1657             <field name="view_id" ref="view_move_tree_reception_picking"/>
1658             <field name="act_window_id" ref="action_out_picking_move"/>
1659         </record>
1660         <record model="ir.actions.act_window.view" id="action_move_out_picking_form">
1661             <field name="sequence" eval="2"/>
1662             <field name="view_mode">form</field>
1663             <field name="view_id" ref="view_move_form"/>
1664             <field name="act_window_id" ref="action_out_picking_move"/>
1665         </record>
1666
1667       <menuitem action="action_reception_picking_move" id="menu_action_pdct_in" parent="menu_stock_products_moves" sequence="1"/>
1668       <menuitem action="action_out_picking_move" id="menu_action_pdct_out" parent="menu_stock_products_moves" sequence="2"/>
1669
1670
1671          <record id="view_stock_journal_filter" model="ir.ui.view">
1672             <field name="name">stock.journal.filter</field>
1673             <field name="model">stock.journal</field>
1674             <field name="arch" type="xml">
1675                 <search string="Stock Journal">
1676                     <field name="name" string="Stock Journal"/>
1677                     <field name="user_id"/>
1678                 </search>
1679             </field>
1680         </record>
1681         <record model="ir.ui.view" id="view_stock_journal_tree">
1682             <field name="name">Stock Journals</field>
1683             <field name="model">stock.journal</field>
1684             <field name="arch" type="xml">
1685                 <tree string="Stock Journal">
1686                     <field name="name"/>
1687                     <field name="user_id"/>
1688                 </tree>
1689             </field>
1690         </record>
1691         <record model="ir.ui.view" id="view_stock_journal_form">
1692             <field name="name">Stock Journals</field>
1693             <field name="model">stock.journal</field>
1694             <field name="arch" type="xml">
1695                 <form string="Stock Journal" version="7.0">
1696                     <group>
1697                         <field name="name"/>
1698                         <field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'account.group_account_invoice', 'stock.group_stock_manager']}"/>
1699                     </group>
1700                 </form>
1701             </field>
1702         </record>
1703         <record id="action_stock_journal_form" model="ir.actions.act_window">
1704             <field name="name">Stock Journals</field>
1705             <field name="res_model">stock.journal</field>
1706             <field name="type">ir.actions.act_window</field>
1707             <field name="view_type">form</field>
1708             <field name="help" type="html">
1709               <p class="oe_view_nocontent_create">
1710                 Click to create a new journal. 
1711               </p><p>
1712                 The stock journal system allows you to assign each stock
1713                 operation to a specific journal according to the type of
1714                 operation to perform or the worker/team that should perform the
1715                 operation. Examples of stock journals may be: quality control,
1716                 pick lists, packing, etc.
1717               </p>
1718             </field>
1719         </record>
1720         <menuitem
1721             action="action_stock_journal_form"
1722             id="menu_action_stock_journal_form"
1723             parent="menu_warehouse_config" sequence="1"/>
1724
1725     </data>
1726 </openerp>