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