[IMP]:improved the menu of Resources in project_long_term and mrp
[odoo/odoo.git] / addons / mrp / mrp_view.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3     <data>
4
5         <menuitem icon="terp-mrp" id="base.menu_mrp_root" name="Manufacturing"
6             groups="group_mrp_user,group_mrp_manager" sequence="3"/>
7         <menuitem id="menu_mrp_reordering" name="Automatic Procurements" parent="stock.menu_stock_root" sequence="4"/>
8                 <menuitem id="menu_mrp_manufacturing" name="Manufacturing" parent="base.menu_mrp_root" sequence="1"/>
9
10         <menuitem name="Control" id="menu_mrp_control" parent="base.menu_mrp_root"  sequence="3" />
11         <menuitem name="Master Data"
12                   id="menu_mrp_bom"
13                   parent="base.menu_mrp_root"
14                   sequence="5" />
15         <!--
16         Property / Property Group
17         -->
18
19         <record id="mrp_property_group_form_view" model="ir.ui.view">
20             <field name="name">mrp.property.group.form</field>
21             <field name="model">mrp.property.group</field>
22             <field name="type">form</field>
23             <field name="arch" type="xml">
24                 <form string="Properties categories">
25                     <separator colspan="4" string="General Information"/>
26                     <field colspan="4" name="name" select="1"/>
27                     <field colspan="4" name="description"/>
28                 </form>
29             </field>
30         </record>
31         <record id="mrp_property_group_action" model="ir.actions.act_window">
32             <field name="name">Property Categories</field>
33             <field name="type">ir.actions.act_window</field>
34             <field name="res_model">mrp.property.group</field>
35             <field name="view_type">form</field>
36             <field name="view_mode">tree,form</field>
37         </record>
38         <menuitem
39             id="menu_mrp_configuration"
40             name="Configuration"
41             parent="base.menu_mrp_root"
42             groups="group_mrp_manager"
43             sequence="50" />
44
45         <record id="mrp_property_tree_view" model="ir.ui.view">
46             <field name="name">mrp.property.tree</field>
47             <field name="model">mrp.property</field>
48             <field name="type">tree</field>
49             <field name="arch" type="xml">
50                 <tree string="Properties">
51                     <field name="name"/>
52                     <field name="composition"/>
53                     <field name="group_id"/>
54                 </tree>
55             </field>
56         </record>
57         <record id="mrp_property_form_view" model="ir.ui.view">
58             <field name="name">mrp.property.form</field>
59             <field name="model">mrp.property</field>
60             <field name="type">form</field>
61             <field name="arch" type="xml">
62                 <form string="Properties">
63                     <separator colspan="4" string="General Information"/>
64                     <field colspan="4" name="name" select="1"/>
65                     <field name="group_id" select="1"/>
66                     <field name="composition" select="1"/>
67                     <separator colspan="4" string="Description"/>
68                     <field colspan="4" name="description"/>
69                 </form>
70             </field>
71         </record>
72         <record id="mrp_property_action" model="ir.actions.act_window">
73             <field name="name">Properties</field>
74             <field name="type">ir.actions.act_window</field>
75             <field name="res_model">mrp.property</field>
76             <field name="view_type">form</field>
77             <field name="view_mode">tree,form</field>
78         </record>
79         <menuitem name="Properties"
80             id="menu_mrp_property"
81             parent="menu_mrp_configuration"
82             groups="base.group_extended"
83             sequence="20" />
84         <menuitem
85             action="mrp_property_action"
86             id="menu_mrp_property_action"
87             parent="menu_mrp_property"
88             groups="base.group_extended" />
89         <menuitem
90             action="mrp_property_group_action"
91             id="menu_mrp_property_group_action"
92             parent="menu_mrp_property"/>
93
94         <!--
95         Work Centers
96         -->
97
98         <record id="mrp_workcenter_tree_view" model="ir.ui.view">
99             <field name="name">mrp.workcenter.tree</field>
100             <field name="model">mrp.workcenter</field>
101             <field name="type">tree</field>
102             <field name="arch" type="xml">
103                 <tree string="Work Center">
104                     <field name="code"/>
105                     <field name="name"/>
106                 </tree>
107             </field>
108         </record>
109         <record id="mrp_workcenter_view" model="ir.ui.view">
110             <field name="name">mrp.workcenter.form</field>
111             <field name="model">mrp.workcenter</field>
112             <field name="type">form</field>
113             <field name="arch" type="xml">
114                 <form string="Work Center">
115                     <group col="6" colspan="4">
116                         <field name="name" select="1"/>
117                         <field name="code" select="1"/>
118                         <field name="active" select="2"/>
119                         <field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
120                     </group>
121                     <notebook colspan="4">
122                         <page string="Work Center">
123                             <field name="resource_type"/>
124                             <field name="calendar_id"/>
125                             <separator colspan="4" string="Description"/>
126                             <field colspan="4" name="note" nolabel="1"/>
127                             <separator colspan="4" string="Capacity Information"/>
128                             <group col="4" colspan="4">
129                                 <field name="capacity_per_cycle"/>
130                                 <newline/>
131                                 <field name="time_cycle"/>
132                                 <field name="time_efficiency"/>
133                                 <field name="time_start"/>
134                                 <field name="time_stop"/>
135                             </group>
136                         </page>
137                         <page string="Analytic Accounting">
138                             <field name="costs_hour"/>
139                             <field name="costs_hour_account_id"/>
140                             <field name="costs_cycle"/>
141                             <field name="costs_cycle_account_id"/>
142                             <field name="costs_journal_id"/>
143                             <field name="costs_general_account_id"/>
144                         </page>
145                     </notebook>
146                 </form>
147             </field>
148         </record>
149         <record id="mrp_workcenter_action" model="ir.actions.act_window">
150             <field name="name">Work Centers</field>
151             <field name="type">ir.actions.act_window</field>
152             <field name="res_model">mrp.workcenter</field>
153             <field name="view_type">form</field>
154             <field name="view_id" ref="mrp_workcenter_tree_view"/>
155         </record>
156
157         <!--
158         Routings
159         -->
160
161         <record id="mrp_routing_workcenter_tree_view" model="ir.ui.view">
162             <field name="name">mrp.routing.workcenter.tree</field>
163             <field name="model">mrp.routing.workcenter</field>
164             <field name="type">tree</field>
165             <field name="arch" type="xml">
166                 <tree string="Routing Work Centers">
167                     <field name="sequence"/>
168                     <field name="workcenter_id" select="1"/>
169                     <field name="cycle_nbr"/>
170                     <field name="hour_nbr"/>
171                 </tree>
172             </field>
173         </record>
174
175         <record id="mrp_routing_workcenter_form_view" model="ir.ui.view">
176             <field name="name">mrp.routing.workcenter.form</field>
177             <field name="model">mrp.routing.workcenter</field>
178             <field name="type">form</field>
179             <field name="arch" type="xml">
180                 <form string="Routing Work Centers">
181                     <separator colspan="4" string="General Information"/>
182                     <field colspan="4" name="name" select="1"/>
183                     <field name="sequence" select="1"/>
184                     <field name="workcenter_id" select="1"/>
185                     <field name="cycle_nbr"/>
186                     <field name="hour_nbr"/>
187                     <field colspan="4" name="note"/>
188                 </form>
189             </field>
190         </record>
191
192         <record id="mrp_routing_form_view" model="ir.ui.view">
193             <field name="name">mrp.routing.form</field>
194             <field name="model">mrp.routing</field>
195             <field name="type">form</field>
196             <field name="arch" type="xml">
197                 <form string="Routing">
198                     <separator colspan="4" string="General Information"/>
199                     <field name="name" select="1"/>
200                     <field name="active" select="1"/>
201                     <field name="code" select="1"/>
202                     <field name="location_id"/>
203                     <separator colspan="4" string="Description"/>
204                     <field colspan="4" name="note" nolabel="1"/>
205                     <separator colspan="4" string="Work Center Operations"/>
206                     <field colspan="4" name="workcenter_lines" nolabel="1" widget="one2many_list"/>
207                 </form>
208             </field>
209         </record>
210         <record id="mrp_routing_tree_view" model="ir.ui.view">
211             <field name="name">mrp.routing.tree</field>
212             <field name="model">mrp.routing</field>
213             <field name="type">tree</field>
214             <field name="arch" type="xml">
215                 <tree string="Routing">
216                     <field name="code"/>
217                     <field name="name"/>
218                     <field name="location_id"/>
219                 </tree>
220             </field>
221         </record>
222         <record id="mrp_routing_action" model="ir.actions.act_window">
223             <field name="name">Routings</field>
224             <field name="type">ir.actions.act_window</field>
225             <field name="res_model">mrp.routing</field>
226             <field name="view_type">form</field>
227             <field name="view_id" ref="mrp_routing_tree_view"/>
228         </record>
229  <!--       <menuitem name="Routings" id="menu_mrp_routing_and_workcenters" parent="mrp.menu_mrp_bom" groups="base.group_extended"
230                   sequence="100" />-->
231         <menuitem action="mrp_workcenter_action" id="menu_mrp_workcenter_action" parent="mrp.menu_mrp_bom" groups="base.group_extended" sequence="40" />
232         <menuitem action="mrp_routing_action" id="menu_mrp_routing_action" parent="mrp.menu_mrp_bom" groups="base.group_extended" sequence="30"/>
233
234         <!--
235           Bill of Materials
236         -->
237
238         <record id="mrp_bom_form_view" model="ir.ui.view">
239             <field name="name">mrp.bom.form</field>
240             <field name="model">mrp.bom</field>
241             <field name="type">form</field>
242             <field name="arch" type="xml">
243                 <form string="Bill of Material">
244                     <group colspan="4" col="6">
245                       <field name="product_id" on_change="onchange_product_id(product_id, name)" select="1"/>
246                       <field name="name" select="1"/>
247                       <field name="code" select="1"/>
248                       <field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
249                     </group>
250                     <newline/>
251                     <field name="product_uom"/>
252                     <field name="product_qty"/>
253                     <newline/>
254                     <field name="product_uos" groups="product.group_uos"/>
255                     <field name="product_uos_qty" groups="product.group_uos"/>
256                     <field name="routing_id" select="2" groups="base.group_extended"/>
257                     <field name="type" groups="base.group_extended"/>
258                     <notebook colspan="4">
259                         <page string="General Information">
260                             <field colspan="4" name="bom_lines" nolabel="1" widget="one2many_list"/>
261                         </page>
262                         <page string="Revisions" groups="base.group_extended">
263                             <field colspan="4" name="revision_ids" nolabel="1" widget="one2many_list"/>
264                         </page>
265                         <page string="Properties">
266                             <field name="position" select="2"/>
267                             <field name="active" select="2"/>
268                             <field name="sequence"/>
269                             <field name="bom_id"/>
270
271                             <field name="date_start" select="2"/>
272                             <field name="date_stop" select="2"/>
273                             <field name="product_rounding"/>
274                             <field name="product_efficiency"/>
275                             <field colspan="4" name="property_ids" nolabel="2" groups="base.group_extended"/>
276                         </page>
277                     </notebook>
278                 </form>
279             </field>
280         </record>
281
282        <record id="mrp_bom_tree_view" model="ir.ui.view">
283             <field name="name">mrp.bom.tree</field>
284             <field name="model">mrp.bom</field>
285             <field name="type">tree</field>
286             <field name="field_parent">child_complete_ids</field>
287             <field name="arch" type="xml">
288                 <tree string="BoM Structure" colors="blue:method">
289                     <field name="name"/>
290                     <field name="code"/>
291                     <field name="product_id"/>
292                     <field name="product_qty"/>
293                     <field name="product_uom"/>
294                     <field name="method"/>
295                     <field name="routing_id" groups="base.group_extended"/>
296                     <field name="date_start"/>
297                     <field name="date_stop"/>
298                 </tree>
299             </field>
300         </record>
301         <record id="mrp_bom_form_action" model="ir.actions.act_window">
302             <field name="name">Master Bill of Materials</field>
303             <field name="type">ir.actions.act_window</field>
304             <field name="res_model">mrp.bom</field>
305             <field name="view_type">form</field>
306             <field name="domain">[('bom_id','=',False)]</field>
307             <field name="view_id" ref="mrp_bom_tree_view"/>
308         </record>
309         <record id="mrp_bom_form_action2" model="ir.actions.act_window">
310             <field name="name">Bill of Material Components</field>
311             <field name="type">ir.actions.act_window</field>
312             <field name="res_model">mrp.bom</field>
313             <field name="view_type">form</field>
314             <field name="domain">[('bom_id','!=',False)]</field>
315         </record>
316
317         <!-- BOM menus -->
318
319   <!--      <menuitem name="Bill of Materials"
320                   id="menu_mrp_bom"
321                   parent="menu_mrp_bom"
322                   sequence="50" />-->
323         <menuitem action="mrp_bom_form_action"
324                   id="menu_mrp_bom_form_action"
325                   parent="menu_mrp_bom"
326                   sequence="10"/>
327         <menuitem action="mrp_bom_form_action2"
328                   id="menu_mrp_bom_form_action2"
329                   parent="menu_mrp_bom"
330                   sequence="20"/>
331
332         <record id="action2" model="ir.actions.act_window">
333             <field name="name">Bill of Materials Structure</field>
334             <field name="type">ir.actions.act_window</field>
335             <field name="res_model">mrp.bom</field>
336             <field name="domain">[('id','=',active_id)]</field>
337             <field name="view_type">tree</field>
338             <field name="view_id" ref="mrp_bom_tree_view"/>
339         </record>
340         <record id="ir_BOM_structure" model="ir.values">
341             <field eval="'client_action_multi'" name="key2"/>
342             <field eval="'mrp.bom'" name="model"/>
343             <field name="name">Bill of Materials Structure</field>
344             <field eval="'ir.actions.act_window,'+str(action2)" name="value"/>
345             <field eval="True" name="object"/>
346         </record>
347
348         <record id="mrp_bom_revision_tree" model="ir.ui.view">
349             <field name="name">mrp.bom.revision</field>
350             <field name="model">mrp.bom.revision</field>
351             <field name="type">tree</field>
352             <field name="arch" type="xml">
353                 <tree string="BoM Revisions">
354                     <field name="indice"/>
355                     <field name="author_id"/>
356                     <field name="date"/>
357                     <field colspan="4" name="name"/>
358                 </tree>
359             </field>
360         </record>
361         <record id="mrp_bom_revision_form" model="ir.ui.view">
362             <field name="name">mrp.bom.revision</field>
363             <field name="model">mrp.bom.revision</field>
364             <field name="type">form</field>
365             <field name="arch" type="xml">
366                 <form string="BoM Revisions">
367                     <field colspan="4" name="name"/>
368                     <field colspan="1" name="indice"/>
369                     <field colspan="1" name="date"/>
370                     <field name="author_id" readonly="1"/>
371                     <field colspan="4" name="description"/>
372                 </form>
373             </field>
374         </record>
375
376         <!--
377     Production Management
378     -->
379
380         <record id="mrp_production_tree_view" model="ir.ui.view">
381             <field name="name">mrp.production.tree</field>
382             <field name="model">mrp.production</field>
383             <field name="type">tree</field>
384             <field name="arch" type="xml">
385                 <tree colors="red:date_planned&lt;current_date and state not in ('done','cancel');black:date_planned&gt;=current_date and state in ('done','cancel') " string="Manufacturing Orders">
386                     <field name="name"/>
387                     <field name="product_id"/>
388                     <field name="product_qty" sum="Total Qty"/>
389                     <field name="date_planned"/>
390                     <field name="routing_id" groups="base.group_extended"/>
391                     <field name="hour_total" sum="Total Hours" groups="base.group_extended"/>
392                     <field name="cycle_total" sum="Total Cycles" groups="base.group_extended"/>
393                     <field name="origin"/>
394                     <field name="state"/>
395                 </tree>
396             </field>
397         </record>
398
399         <record id="view_production_calendar" model="ir.ui.view">
400             <field name="name">mrp.production.calendar</field>
401             <field name="model">mrp.production</field>
402             <field name="type">calendar</field>
403             <field eval="2" name="priority"/>
404             <field name="arch" type="xml">
405                 <calendar color="routing_id" date_start="date_planned" string="Manufacturing Orders">
406                     <field name="origin"/>
407                     <field name="product_id"/>
408                     <field name="product_qty"/>
409                 </calendar>
410             </field>
411         </record>
412
413
414         <record id="view_production_gantt" model="ir.ui.view">
415             <field name="name">mrp.production.gantt</field>
416             <field name="model">mrp.production</field>
417             <field name="type">gantt</field>
418             <field name="arch" type="xml">
419                 <gantt color="product_id" date_stop="date_finnished" date_start="date_start" string="Productions">
420                     <level object="mrp.routing" link="routing_id" domain="[]">
421                         <field name="name"/>
422                         <field name="origin"/>
423                     </level>
424                 </gantt>
425             </field>
426         </record>
427
428
429         <record model="ir.ui.view" id="view_production_graph">
430             <field name="name">mrp.production.graph</field>
431             <field name="model">mrp.production</field>
432             <field name="type">graph</field>
433             <field name="arch" type="xml">
434                 <graph string="Manufacturing Orders" type="bar">
435                     <field name="date_planned_date"/>
436                     <field name="hour_total" operator="+"/>
437                     <field name="cycle_total" operator="+"/>
438                 </graph>
439             </field>
440         </record>
441
442         <wizard
443             string="Change Product Qty."
444             model="mrp.production"
445             name="change_production_qty"
446             id="mrp.wizard_change_production_qty"
447             keyword="client_action_multi"
448             multi="True"/>
449
450         <record id="mrp_production_form_view" model="ir.ui.view">
451             <field name="name">mrp.production.form</field>
452             <field name="model">mrp.production</field>
453             <field name="type">form</field>
454             <field name="arch" type="xml">
455                 <form string="Manufacturing Orders">
456                     <group colspan="4" col="6">
457                         <field name="name" select="1" string="Reference"/>
458                         <field name="date_planned" select="1"/>
459                         <field name="origin" select="1"/>
460                         <field name="product_id" on_change="product_id_change(product_id)" select="1"/>
461                         <field name="product_qty"/>
462                         <group colspan="2" col="3">
463                             <field name="product_uom"/>
464                         </group>
465                         <label string="" colspan="2"/>
466                         <field name="product_uos_qty" groups="product.group_uos"/>
467                         <group colspan="2" col="3" groups="product.group_uos">
468                             <field name="product_uos"/>
469                             <label string=""/>
470                         </group>
471                     </group>
472
473                     <notebook colspan="4">
474                         <page string="Consumed Products">
475                             <field name="bom_id" select="2" domain="[('product_id','=',product_id),('bom_id','=',False)]" on_change="bom_id_change(bom_id)"/>
476                             <field name="routing_id" groups="base.group_extended" select="1"/>
477                             <field name="location_src_id" select="2" domain="[('usage','=','internal')]" on_change="location_id_change(location_src_id,location_dest_id)"/>
478                             <field name="location_dest_id" domain="[('usage','=','internal')]"/>
479                             <separator string="" colspan="4"/>
480
481                             <field colspan="2" name="move_lines" nolabel="1" widget="one2many_list"
482                                 mode="tree,form" height="275" domain="[('state','&lt;&gt;', ('done', 'cancel'))]">
483                                 <tree string="Products to Consume">
484                                         <field name="product_id" />
485                                         <field name="product_qty" />
486                                         <field name="product_uom" />
487                                         <field name="state" invisible="1" />
488                                         <button
489                                                 name="%(stock.move_consume)d"
490                                                 string=">" type="action"
491                                                 icon="gtk-go-forward" context="{'consume': True}"
492                                                 states="draft,waiting,confirmed,assigned"/>
493                                         <button name="%(stock.move_scrap)d"
494                                                 string="D" type="action"
495                                                 icon="gtk-justify-fill" context="{'scrap': True}"
496                                                 states="draft,waiting,confirmed,assigned" />
497                                 </tree>
498                                 <form string="Products to Consume">
499                                         <field name="product_id" />
500                                         <field name="product_qty" />
501                                         <field name="product_uom" />
502                                 </form>
503                             </field>
504
505                             <field colspan="2" name="move_lines2" nolabel="1"  domain="[('state','in', ('done', 'cancel'))]"
506                                                 widget="one2many_list" mode="tree,form" height="275">
507                                         <tree string="Consumed Products" editable="bottom">
508                                                 <field name="product_id" readonly="1"/>
509                                                 <field name="product_qty" readonly="1"/>
510                                                 <field name="product_uom" readonly="1" />
511                                                 <field name="state" invisible="1" />
512                                                 <field name="location_id" readonly="1"/>
513                                                 <field name="prodlot_id" />
514                                                 <button
515                                                         name="%(stock.track_line)d"
516                                                         string="Split in production lots"
517                                                         type="action" icon="gtk-justify-fill"
518                                                         states="done,cancel" />
519                                                 <button
520                                                         name="%(stock.move_scrap)d"
521                                                         string="D" type="action"
522                                                         icon="gtk-convert"
523                                                         states="done,cancel" />
524                                         </tree>
525                                         <form string="Consumed Products">
526                                                 <field name="product_id" />
527                                                 <field name="product_qty" />
528                                                 <field name="product_uom" />
529                                         </form>
530                                 </field>
531
532                             <group col="9" colspan="4">
533                                 <field name="state" select="2"/>
534                                 <button name="action_compute" states="draft" string="Compute Data" type="object" icon="gtk-execute"/>
535                                 <button name="button_confirm" states="draft" string="Confirm Production" icon="gtk-apply"/>
536                                 <button name="button_produce" states="ready" string="Mark as Start" icon="gtk-execute"/>
537                                 <button name="%(act_mrp_product_produce)d" states="in_production" string="Produce" icon="gtk-ok" type="action"/>
538                                 <button name="force_production" states="confirmed,picking_except" string="Force Reservation" type="object" icon="gtk-jump-to"/>
539                                 <button name="button_cancel" states="draft,ready,confirmed,in_production,picking_except" string="Cancel" icon="gtk-cancel"/>
540                                 <button name="button_recreate" states="picking_except" string="Recreate Picking" icon="gtk-convert"/>
541                             </group>
542                         </page>
543                         <page string="Scheduled Products">
544                             <field colspan="4" name="product_lines" nolabel="1" widget="one2many_list"/>
545                         </page>
546                         <page string="Finished Products">
547                             <field colspan="2" name="move_created_ids" nolabel="1" widget="one2many_list"
548                                 mode="tree,form" height="275" domain="[('state','&lt;&gt;', ('done', 'cancel'))]">
549                                 <tree string="Products to Finish">
550                                         <field name="product_id" />
551                                         <field name="product_qty" />
552                                         <field name="product_uom" />
553                                         <field name="state" invisible="1" />
554                                         <button
555                                                 name="%(stock.move_consume)d"
556                                                 string=">" type="action"
557                                                 icon="gtk-go-forward"
558                                                 states="draft,waiting,confirmed,assigned"/>
559                                         <button name="%(stock.move_scrap)d"
560                                                 string="D" type="action"
561                                                 icon="gtk-justify-fill" context="{'scrap': True}"
562                                                 states="draft,waiting,confirmed,assigned" />
563                                 </tree>
564                                 <form string="Products to Finish">
565                                         <field name="product_id" />
566                                         <field name="product_qty" />
567                                         <field name="product_uom" />
568                                 </form>
569                             </field>
570
571                             <field colspan="2" name="move_created_ids2" nolabel="1"  domain="[('state','in', ('done', 'cancel'))]"
572                                                 widget="one2many_list" mode="tree,form" height="275">
573                                         <tree string="Finished Products" editable="bottom">
574                                                 <field name="product_id" readonly="1"/>
575                                                 <field name="product_qty" readonly="1"/>
576                                                 <field name="product_uom" readonly="1" />
577                                                 <field name="state" invisible="1" />
578                                                 <field name="location_id" readonly="1"/>
579                                                 <field name="prodlot_id" />
580                                                 <button name="%(stock.track_line)d"
581                                             string="Split in production lots" type="action" icon="gtk-justify-fill" states="done,cancel"/>
582                                                 <button name="%(stock.move_scrap)d"
583                                                         string="D" type="action" icon="gtk-go-forward"
584                                                         states="done,cancel" />
585                                         </tree>
586                                         <form string="Finished Products">
587                                                 <field name="product_id" />
588                                                 <field name="product_qty" />
589                                                 <field name="product_uom" />
590                                         </form>
591                                 </field>
592                         </page>
593                         <page string="Work Orders">
594                             <field colspan="4" name="workcenter_lines" nolabel="1">
595                                 <form string="Production Work Centers">
596                                     <field colspan="4" name="name" select="1"/>
597                                     <field colspan="4" name="workcenter_id" select="1"/>
598                                     <field name="sequence"/>
599                                     <field name="cycle"/>
600                                     <field name="hour"/>
601                                 </form>
602                                 <tree string="Production Work Centers">
603                                     <field name="sequence"/>
604                                     <field name="name"/>
605                                     <field name="workcenter_id"/>
606                                     <field name="cycle"/>
607                                     <field name="hour"/>
608                                 </tree>
609                             </field>
610
611                         </page>
612                         <page string="Extra Information">
613                             <field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
614                             <field name="priority" groups="base.group_extended"/>
615                             <newline/>
616                             <field name="date_start" select="2"/>
617                             <field name="date_finnished"/>
618                             <field name="picking_id"/>
619                             <field name="move_prod_id"/>
620                             <field name="sale_name"/>
621                             <field name="sale_ref"/>
622                         </page>
623                     </notebook>
624                 </form>
625             </field>
626         </record>
627
628         <record id="view_mrp_production_filter" model="ir.ui.view">
629             <field name="name">mrp.production.select</field>
630             <field name="model">mrp.production</field>
631             <field name="type">search</field>
632             <field name="arch" type="xml">
633                 <search string="Search Production">
634                    <group col='9' colspan='4'>
635                        <filter icon="terp-mrp" string="Ready"
636                         domain="[('state','=','ready')]"
637                         help="Manufacturing Orders which are ready to produce" />
638                        <filter icon="terp-mrp" string="In Production"
639                         domain="[('state','=','in_production')]"
640                         help="Manufacturing Orders which are in production" />
641                        <filter icon="terp-mrp" string="Late"
642                         domain="['&amp;', ('date_planned::date','&lt;', current_date), ('state', 'in', ('draft', 'confirmed', 'ready'))]"
643                         help="Production started late" />
644
645                        <separator orientation="vertical"/>
646                        <field name="name" select='1'/>
647                        <field name="product_id" select='1'/>
648                        <field name="routing_id" select='1'/>
649                        <field name="origin" select='1'/>
650                     </group>
651                     <group expand="1" string="Group By" colspan="4" col="8">
652                         <filter string="Product" icon="terp-mrp" domain="[]" context="{'group_by':'product_id'}"/>
653                         <filter string="State" icon="terp-mrp" domain="[]" context="{'group_by':'state'}"/>
654                         <filter string="Date" icon="terp-mrp" domain="[]" context="{'group_by':'date_planned'}"/>
655                         <filter string="Routing" icon="terp-mrp" domain="[]" context="{'group_by':'routing_id'}"/>
656                     </group>
657                </search>
658             </field>
659         </record>
660
661         <record id="mrp_production_action" model="ir.actions.act_window">
662             <field name="name">Manufacturing Orders</field>
663             <field name="type">ir.actions.act_window</field>
664             <field name="res_model">mrp.production</field>
665             <field name="view_type">form</field>
666             <field name="view_mode">tree,form,calendar,graph,gantt</field>
667             <field name="view_id" eval="False"/>
668             <field name="search_view_id" ref="view_mrp_production_filter"/>
669         </record>
670         <menuitem action="mrp_production_action" id="menu_mrp_production_action" parent="menu_mrp_manufacturing" sequence="1"/>
671
672         <record id="mrp_production_action2_gantt" model="ir.actions.act_window">
673             <field name="name">Manufacturing Orders Planning</field>
674             <field name="type">ir.actions.act_window</field>
675             <field name="res_model">mrp.production</field>
676             <field name="view_type">form</field>
677             <field name="view_mode">gantt,tree,form,calendar,graph</field>
678             <field name="domain">[('state','in',('ready','confirmed','in_production'))]</field>
679         </record>
680
681         <record id="mrp_production_action2" model="ir.actions.act_window">
682             <field name="name">Manufacturing Orders To Start</field>
683             <field name="type">ir.actions.act_window</field>
684             <field name="res_model">mrp.production</field>
685             <field name="view_type">form</field>
686             <field name="view_mode">tree,form,calendar,graph,gantt</field>
687             <field name="domain">[('state','=','ready')]</field>
688             <field name="filter" eval="True"/>
689             <field name="search_view_id" ref="view_mrp_production_filter"/>
690         </record>
691
692         <record id="mrp_production_action3" model="ir.actions.act_window">
693             <field name="name">Manufacturing Orders in Progress</field>
694             <field name="type">ir.actions.act_window</field>
695             <field name="res_model">mrp.production</field>
696             <field name="view_type">form</field>
697             <field name="view_mode">tree,form,calendar,graph,gantt</field>
698             <field name="domain">[('state','=','in_production')]</field>
699             <field name="filter" eval="True"/>
700             <field name="search_view_id" ref="view_mrp_production_filter"/>
701         </record>
702
703         <record id="mrp_production_action4" model="ir.actions.act_window">
704             <field name="name">Manufacturing Orders Waiting Products</field>
705             <field name="type">ir.actions.act_window</field>
706             <field name="res_model">mrp.production</field>
707             <field name="view_type">form</field>
708             <field name="view_mode">tree,form,calendar,graph,gantt</field>
709             <field name="domain">[('state','=','confirmed')]</field>
710             <field name="filter" eval="True"/>
711             <field name="search_view_id" ref="view_mrp_production_filter"/>
712         </record>
713
714         <record id="mrp_production_lot_form_view" model="ir.ui.view">
715             <field name="name">mrp.production.lot.line.form</field>
716             <field name="model">mrp.production.lot.line</field>
717             <field name="type">form</field>
718             <field name="arch" type="xml">
719                 <form string="Production Products">
720                     <field colspan="4" name="move_id" on_change="onchange_lot_line_id(lot_id)"/>
721                     <field name="name"/>
722                     <field name="product_id"/>
723                     <field name="product_qty"/>
724                     <field name="product_uom"/>
725                     <field name="product_uos_qty"/>
726                     <field name="product_uos"/>
727                     <field name="tracking_id"/>
728                 </form>
729             </field>
730         </record>
731         <record id="mrp_production_lot_tree_view" model="ir.ui.view">
732             <field name="name">mrp.production.lot.line.tree</field>
733             <field name="model">mrp.production.lot.line</field>
734             <field name="type">tree</field>
735             <field name="arch" type="xml">
736                 <tree string="Production Products Consommation">
737                     <field name="product_id"/>
738                     <field name="product_qty"/>
739                     <field name="product_uom"/>
740                     <field name="product_uos_qty"/>
741                     <field name="product_uos"/>
742                     <field name="tracking_id"/>
743                 </tree>
744             </field>
745         </record>
746
747         <record id="mrp_production_product_form_view" model="ir.ui.view">
748             <field name="name">mrp.production.product.line.form</field>
749             <field name="model">mrp.production.product.line</field>
750             <field name="type">form</field>
751             <field name="arch" type="xml">
752                 <form string="Scheduled Products">
753                     <field name="name"/>
754                     <field name="product_id"/>
755                     <field name="product_qty"/>
756                     <field name="product_uom"/>
757                     <field name="product_uos_qty"/>
758                     <field name="product_uos"/>
759                 </form>
760             </field>
761         </record>
762         <record id="mrp_production_product_tree_view" model="ir.ui.view">
763             <field name="name">mrp.production.product.line.tree</field>
764             <field name="model">mrp.production.product.line</field>
765             <field name="type">tree</field>
766             <field name="arch" type="xml">
767                 <tree string="Scheduled Products">
768                     <field name="product_id"/>
769                     <field name="product_qty"/>
770                     <field name="product_uom"/>
771                     <field name="product_uos_qty"/>
772                     <field name="product_uos"/>
773                 </tree>
774             </field>
775         </record>
776
777         <!--
778         Procurement
779         -->
780
781         <record id="mrp_procurement_tree_view" model="ir.ui.view">
782             <field name="name">mrp.procurement.tree</field>
783             <field name="model">mrp.procurement</field>
784             <field name="type">tree</field>
785             <field name="arch" type="xml">
786                 <tree string="Procurement Lines" colors="red:state=='draft';black:state=='running';green:state=='confirmed';gray:state in ['done','cancel']">
787                     <field name="date_planned" widget="date"/>
788                     <field name="origin"/>
789                     <field name="product_id"/>
790                     <field name="product_qty"/>
791                     <field name="product_uom" string="UOM"/>
792                     <field name="procure_method"/>
793                     <field name="state"/>
794                 </tree>
795             </field>
796         </record>
797         <record id="mrp_procurement_form_view" model="ir.ui.view">
798             <field name="name">mrp.procurement.form</field>
799             <field name="model">mrp.procurement</field>
800             <field name="type">form</field>
801             <field name="arch" type="xml">
802                 <form string="Procurement">
803                     <group col="2" colspan="2">
804                         <separator colspan="2" string="References"/>
805                         <field name="name" select="1" string="Procurement Reason"/>
806                         <field name="origin" select="2"/>
807                         <field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
808                     </group>
809                     <group col="2" colspan="2">
810                         <separator colspan="2" string="Planification"/>
811                         <field name="date_planned" select="1" widget="date"/>
812                         <field name="procure_method" select="2"/>
813                         <field name="priority" groups="base.group_extended"/>
814                     </group>
815                     <notebook colspan="4">
816                     <page string="Procurement Details">
817                         <separator colspan="4" string="Product &amp; Location"/>
818                         <field name="product_id" select="1" on_change="onchange_product_id(product_id)"/>
819                         <field name="location_id" select="2"/>
820                         <field name="product_qty"/>
821                         <field name="product_uom"/>
822
823                         <field name="product_uos_qty" groups="product.group_uos"/>
824                         <field name="product_uos" groups="product.group_uos"/>
825
826                         <separator colspan="4" string="Status"/>
827                         <field colspan="4" name="message" readonly="1"/>
828                         <field name="state" readonly="1" select="2"/>
829                         <group col="7" colspan="2">
830                             <button name="button_confirm" states="draft" string="Confirm" icon="gtk-apply"/>
831                             <button name="button_restart" states="exception" string="Retry" icon="gtk-convert"/>
832                             <button name="button_cancel" states="draft,exception,waiting" string="Cancel" icon="gtk-cancel"/>
833                             <button name="button_check" states="confirmed" string="Run  Procurement" icon="gtk-media-play"/>
834                         </group>
835                     </page>
836                     <page string="Extra Information">
837                         <separator colspan="4" string="Details"/>
838                         <field name="bom_id" select="2" domain="[('product_id','=',product_id),('bom_id','=',False)]"/>
839                         <field name="move_id" groups="base.group_extended"/>
840                         <field name="date_close" select="2"/>
841                         <field name="close_move" groups="base.group_extended"/>
842                         <field name="purchase_id"/>
843                         <group colspan="4"  groups="base.group_extended">
844                             <separator colspan="4" string="Properties" />
845                             <field colspan="4" name="property_ids" nolabel="1"/>
846                         </group>
847                     </page>
848                     <page string="Notes">
849                         <separator colspan="4" string="Note" />
850                         <field name="note" colspan="4" nolabel="1"/>
851                     </page>
852                     </notebook>
853                 </form>
854             </field>
855         </record>
856         <record id="view_mrp_procurement_filter" model="ir.ui.view">
857             <field name="name">mrp.procurement.select</field>
858             <field name="model">mrp.procurement</field>
859             <field name="type">search</field>
860             <field name="arch" type="xml">
861                 <search string="Search Procurement">
862                     <group col='10' colspan='4'>
863                        <filter icon="terp-mrp" string="Current" domain="[('state','in',('draft','confirmed'))]" default="1" help="Procurement Orders in draft or open state."/>
864                        <filter icon="terp-mrp" string="Exceptions" domain="[('state','=','exception')]" help="Procurement Orders with exceptions"/>
865                        <filter icon="terp-mrp" string="Late"
866                         domain="['&amp;', ('date_planned::date','&lt;', current_date), ('state', 'in', ('draft', 'confirmed'))]"
867                         help="Procurement started late" />
868                        <separator orientation="vertical"/>
869                        <field name="name"/>
870                        <field name="origin"/>
871                        <field name="product_id" />
872                        <field name="date_planned" widget="date"/>
873                        <field name="state" />
874                     </group>
875                     <group expand="1" string="Group By" colspan="4" col="8">
876                         <filter string="Product" icon="terp-mrp" domain="[]" context="{'group_by':'product_id'}"/>
877                         <filter string="Reason" icon="terp-mrp" domain="[]" context="{'group_by':'name'}"/>
878                         <filter string="Scheduled Date" icon="terp-mrp" domain="[]" context="{'group_by':'date_planned'}"/>
879                                         </group>
880                 </search>
881             </field>
882         </record>
883         <record id="mrp_procurement_action" model="ir.actions.act_window">
884             <field name="name">Procurement Orders</field>
885             <field name="type">ir.actions.act_window</field>
886             <field name="res_model">mrp.procurement</field>
887             <field name="view_type">form</field>
888             <field name="view_id" eval="False"/>
889             <field name="search_view_id" ref="view_mrp_procurement_filter"/>
890         </record>
891         <menuitem action="mrp_procurement_action" id="menu_mrp_procurement_action" parent="mrp.menu_mrp_manufacturing"
892                   sequence="2" />
893
894         <record id="mrp_procurement_action3" model="ir.actions.act_window">
895             <field name="name">Requisitions</field>
896             <field name="type">ir.actions.act_window</field>
897             <field name="res_model">mrp.procurement</field>
898             <field name="view_type">form</field>
899             <field name="view_mode">tree,form</field>
900             <field name="search_view_id" ref="view_mrp_procurement_filter"/>
901             <field name="domain">[]</field>
902             <field name="context">{}</field>
903         </record>
904
905       <menuitem action="mrp_procurement_action3" id="menu_procurement_requisitions" parent="purchase.menu_procurement_management"
906                   name="Requisitions" sequence="5" />
907
908
909
910         <record id="mrp_procurement_action5" model="ir.actions.act_window">
911             <field name="name">Procurement Exceptions</field>
912             <field name="type">ir.actions.act_window</field>
913             <field name="res_model">mrp.procurement</field>
914             <field name="view_type">form</field>
915             <field name="view_mode">tree,form</field>
916             <field name="domain">[('state','=','exception')]</field>
917         </record>
918
919                 <menuitem action="mrp_procurement_action5" id="menu_mrp_procurement_exception_action" parent="mrp.menu_mrp_control"
920                   sequence="1" />
921         <record id="mrp_procurement_action4" model="ir.actions.act_window">
922             <field name="name">Procurement Exceptions to Fix</field>
923             <field name="type">ir.actions.act_window</field>
924             <field name="res_model">mrp.procurement</field>
925             <field name="view_type">form</field>
926             <field name="view_mode">tree,form</field>
927             <field name="domain">[('state','=','exception'), ('message', '&lt;&gt;', '')]</field>
928             <field name="filter" eval="True"/>
929         </record>
930
931         <record id="mrp_procurement_action11" model="ir.actions.act_window">
932             <field name="name">Temporary Procurement Exceptions</field>
933             <field name="type">ir.actions.act_window</field>
934             <field name="res_model">mrp.procurement</field>
935             <field name="view_type">form</field>
936             <field name="view_mode">tree,form</field>
937             <field name="domain">[('state','=','exception'), ('message', '=', '')]</field>
938         </record>
939
940         <!-- Order Point -->
941         <record id="view_warehouse_orderpoint_tree" model="ir.ui.view">
942             <field name="name">stock.warehouse.orderpoint.tree</field>
943             <field name="model">stock.warehouse.orderpoint</field>
944             <field name="type">tree</field>
945             <field name="arch" type="xml">
946                 <tree string="Minimum Stock Rules">
947                     <field name="name"/>
948                     <field name="warehouse_id"/>
949                     <field name="product_id"/>
950                     <field name="product_uom"/>
951                     <field name="product_min_qty"/>
952                     <field name="product_max_qty"/>
953                 </tree>
954             </field>
955         </record>
956
957         <record model="ir.ui.view" id="warehouse_orderpoint_search">
958             <field name="name">stock.warehouse.orderpoint.search</field>
959             <field name="model">stock.warehouse.orderpoint</field>
960             <field name="type">search</field>
961             <field name="arch" type="xml">
962                 <search string="Minimum Stock Rules Search">
963                     <field name="name" select="1" />
964                     <field name="warehouse_id" select="1" widget="selection"/>
965                     <field name="location_id" select="1" />
966                     <field name="company_id" select="1" widget="selection"/>
967                     <field name="product_id" select="1"/>
968                 </search>
969             </field>
970         </record>
971
972         <record id="view_warehouse_orderpoint_form" model="ir.ui.view">
973             <field name="name">stock.warehouse.orderpoint.form</field>
974             <field name="model">stock.warehouse.orderpoint</field>
975             <field name="type">form</field>
976             <field name="arch" type="xml">
977                 <form string="Minimum Stock Rules">
978                     <group col="2" colspan="2">
979                         <separator string="General Information" colspan="2" />
980                         <field name="name" />
981                         <field name="product_id" on_change="onchange_product_id(product_id)" />
982                         <field name="product_uom"/>
983                     </group>
984                     <group col="2" colspan="2">
985                         <separator string="Locations" colspan="2" />
986                         <field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)" widget="selection"/>
987                         <field name="location_id"/>
988                         <field name="company_id" groups="base.group_multi_company" widget="selection"/>
989                     </group>
990                     <group col="2" colspan="2">
991                         <separator string="Quantity Rules" colspan="2" />
992                         <field name="product_min_qty"/>
993                         <field name="product_max_qty"/>
994                         <field name="qty_multiple"/>
995                     </group>
996                     <group col="2" colspan="2">
997                         <separator string="Misc" colspan="2" />
998                         <field name="procurement_id" readonly="1"/>
999                         <field name="active" />
1000                     </group>
1001                 </form>
1002             </field>
1003         </record>
1004         <record id="action_orderpoint_form" model="ir.actions.act_window">
1005             <field name="name">Minimum Stock Rules</field>
1006             <field name="res_model">stock.warehouse.orderpoint</field>
1007             <field name="type">ir.actions.act_window</field>
1008             <field name="view_type">form</field>
1009             <field name="view_id" ref="view_warehouse_orderpoint_tree"/>
1010             <field name="search_view_id" ref="warehouse_orderpoint_search" />
1011         </record>
1012         <menuitem action="action_orderpoint_form" id="menu_action_orderpoint_form" parent="menu_mrp_reordering"/>
1013
1014         <act_window domain="[('warehouse_id', '=', active_id)]" id="act_stock_warehouse_2_stock_warehouse_orderpoint" name="Minimum Stock Rules" res_model="stock.warehouse.orderpoint" src_model="stock.warehouse"/>
1015
1016         <!-- add product_uom to context to be the default value when adding new orderpoints -->
1017         <act_window
1018             context="{'product_uom': locals().has_key('uom_id') and uom_id}"
1019             domain="[('product_id', '=', active_id)]"
1020             id="act_product_product_2_stock_warehouse_orderpoint"
1021             name="Minimum Stock Rules"
1022             res_model="stock.warehouse.orderpoint"
1023             src_model="product.product"/>
1024
1025         <act_window
1026             id="action_product_bom_structure"
1027             name="Product BoM Structure"
1028             domain="[('product_id', '=', active_id),('bom_id','=',False)]"
1029             view_type="tree"
1030             view_id="mrp_bom_tree_view"
1031             res_model="mrp.bom"
1032             src_model="product.product"/>
1033
1034         <act_window
1035             domain="[('product_id', '=', active_id),('bom_id','=',False)]"
1036             id="act_product_product_2_mrp_bom"
1037             name="Bill of Materials"
1038             res_model="mrp.bom"
1039             src_model="product.product"/>
1040
1041     </data>
1042 </openerp>