[IMP]mrp: remove unused code
[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" parent="" name="Manufacturing"
6             groups="group_mrp_user,group_mrp_manager" sequence="8"
7             web_icon="images/manufacturing.png"
8             web_icon_hover="images/manufacturing-hover.png"/>
9
10         <menuitem id="menu_mrp_manufacturing" name="Manufacturing" parent="base.menu_mrp_root" sequence="1"/>
11
12         <menuitem name="Master Data"
13             id="menu_mrp_bom"
14             parent="base.menu_mrp_root"
15             sequence="5" />
16
17         <!--
18         Property / Property Group
19         -->
20
21         <record id="mrp_property_group_form_view" model="ir.ui.view">
22             <field name="name">mrp.property.group.form</field>
23             <field name="model">mrp.property.group</field>
24             <field name="type">form</field>
25             <field name="arch" type="xml">
26                 <form string="Properties categories" version="7.0">
27                     <label for="name"/>
28                     <field name="name"/>
29                     <label name="description"/>
30                     <field name="description"/>
31                 </form>
32             </field>
33         </record>
34         <record id="mrp_property_group_action" model="ir.actions.act_window">
35             <field name="name">Property Groups</field>
36             <field name="type">ir.actions.act_window</field>
37             <field name="res_model">mrp.property.group</field>
38             <field name="view_type">form</field>
39             <field name="view_mode">tree,form</field>
40             <field name="help">
41                 Define specific property groups that can be assigned to the properties of your bill of materials.
42             </field>
43         </record>
44         <menuitem
45             id="menu_mrp_configuration"
46             name="Configuration"
47             parent="base.menu_mrp_root"
48             groups="group_mrp_manager"
49             sequence="50" />
50
51         <record id="mrp_property_tree_view" model="ir.ui.view">
52             <field name="name">mrp.property.tree</field>
53             <field name="model">mrp.property</field>
54             <field name="type">tree</field>
55             <field name="arch" type="xml">
56                 <tree string="Properties">
57                     <field name="name"/>
58                     <field name="composition"/>
59                     <field name="group_id"/>
60                 </tree>
61             </field>
62         </record>
63         <record id="mrp_property_form_view" model="ir.ui.view">
64             <field name="name">mrp.property.form</field>
65             <field name="model">mrp.property</field>
66             <field name="type">form</field>
67             <field name="arch" type="xml">
68                 <form string="Properties" version="7.0">
69                     <group col="4">
70                         <field colspan="4" name="name"/>
71                         <field name="group_id"/>
72                         <field name="composition"/>
73                     </group>
74                     <label for="description"/>
75                     <field name="description"/>
76                 </form>
77             </field>
78         </record>
79
80         <record id="view_mrp_property_search" model="ir.ui.view">
81             <field name="name">mrp.property.search</field>
82             <field name="model">mrp.property</field>
83             <field name="type">search</field>
84             <field name="arch" type="xml">
85                 <search string="Search">
86                    <group>
87                        <field name="name" string="Name"/>
88                        <separator orientation="vertical"/>
89                        <field name="group_id"  widget="selection" />
90                        <field name="composition"/>
91                    </group>
92                    <newline/>
93                    <group expand="0" string="Group By...">
94                         <filter string="Property Group" icon="terp-personal" domain="[]" context="{'group_by':'group_id'}"/>
95                     </group>
96                </search>
97             </field>
98         </record>
99
100
101         <record id="mrp_property_action" model="ir.actions.act_window">
102             <field name="name">Properties</field>
103             <field name="type">ir.actions.act_window</field>
104             <field name="res_model">mrp.property</field>
105             <field name="view_type">form</field>
106             <field name="view_mode">tree,form</field>
107             <field name="search_view_id" ref="view_mrp_property_search"/>
108             <field name="help">
109                 The Properties in OpenERP are used to select the right bill of materials for manufacturing
110                 a product when you have different ways of building the same product.
111                 You can assign several properties to each bill of materials.
112                 When a salesperson creates a sale order, they can relate it to several properties
113                 and OpenERP will automatically select the BoM to use according the needs.
114             </field>
115         </record>
116         <menuitem name="Master Bill of Materials"
117             id="menu_mrp_property"
118             parent="menu_mrp_configuration"
119             groups="mrp.group_mrp_routings,product.group_mrp_properties"
120             sequence="20" />
121         <menuitem
122             action="mrp_property_action"
123             id="menu_mrp_property_action"
124             groups="product.group_mrp_properties"
125             parent="menu_mrp_configuration"
126             sequence="30" />
127         <menuitem
128             action="mrp_property_group_action"
129             parent="menu_mrp_configuration"
130             groups="base.group_no_one,product.group_mrp_properties"
131             id="menu_mrp_property_group_action"
132             sequence="35" />
133
134         <!--
135         Work Centers
136         -->
137
138         <record id="mrp_workcenter_tree_view" model="ir.ui.view">
139             <field name="name">mrp.workcenter.tree</field>
140             <field name="model">mrp.workcenter</field>
141             <field name="type">tree</field>
142             <field name="arch" type="xml">
143                 <tree string="Work Center">
144                     <field name="code"/>
145                     <field name="name"/>
146                     <field name="resource_type"/>
147                     <field name="company_id" groups="base.group_multi_company"/>
148                 </tree>
149             </field>
150         </record>
151         <record id="mrp_workcenter_view" model="ir.ui.view">
152             <field name="name">mrp.workcenter.form</field>
153             <field name="model">mrp.workcenter</field>
154             <field name="type">form</field>
155             <field name="arch" type="xml">
156                 <form string="Work Center" version="7.0">
157                     <group col="4">
158                         <group>
159                             <field name="name"/>
160                             <field name="resource_type"/>
161                             <field name="calendar_id" widget="selection"/>
162                         </group>
163                         <group>
164                             <field name="code"/>
165                             <field name="company_id" groups="base.group_multi_company" widget="selection"/>
166                             <field name="active"/>
167                         </group>
168                     </group>
169                     <notebook>
170                         <page string="General Information">
171                             <group>
172                                 <group string="Capacity Information">
173                                     <field name="time_efficiency"/>
174                                     <field name="capacity_per_cycle"/>
175                                     <field name="time_cycle" widget="float_time"/>
176                                     <field name="time_start" widget="float_time"/>
177                                     <field name="time_stop" widget="float_time"/>
178                                 </group>
179                                 <group string="Costing Information">
180                                     <field name="product_id" on_change="on_change_product_cost(product_id)"/>
181                                     <field name="costs_hour"/>
182                                     <field name="costs_hour_account_id" groups="analytic.group_analytic_accounting"/>
183                                     <field name="costs_cycle"/>
184                                     <field name="costs_cycle_account_id" groups="analytic.group_analytic_accounting"/>
185                                     <field name="costs_journal_id" attrs="{'required':['|',('costs_hour_account_id', '=', True),('costs_cycle_account_id', '=', True)]}" groups="analytic.group_analytic_accounting"/>
186                                     <field name="costs_general_account_id" attrs="{ 'required':['|',('costs_cycle_account_id', '=', True),('costs_hour_account_id', '=', True)]}" groups="analytic.group_analytic_accounting"/>
187                                 </group>
188                             </group>
189                             <label for="note"/>
190                             <field name="note"/>
191                         </page>
192                     </notebook>
193                 </form>
194             </field>
195         </record>
196
197         <!-- Search Views -->
198
199         <record id="view_mrp_workcenter_search" model="ir.ui.view">
200             <field name="name">mrp.workcenter.search</field>
201             <field name="model">mrp.workcenter</field>
202             <field name="type">search</field>
203             <field name="arch" type="xml">
204                 <search string="Search for mrp workcenter">
205                    <group>
206                         <field name="name" string="Mrp Workcenter" filter_domain="['|',('name','ilike',self),('code','ilike',self)]"/>
207                         <separator orientation="vertical"/>
208                         <filter string="Inactive" icon="terp-gdu-smart-failing" domain="[('active','=',False)]"/>
209                         <separator orientation="vertical"/>
210                         <field name="resource_type"/>
211                    </group>
212                    <newline/>
213                    <group expand="0" string="Group By...">
214                         <filter string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'resource_type'}"/>
215                         <separator orientation="vertical" groups="base.group_multi_company"/>
216                         <filter string="Company" icon="terp-go-home" domain="[]" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
217                    </group>
218                </search>
219             </field>
220         </record>
221
222         <!--
223         Routings
224         -->
225
226         <record id="mrp_routing_workcenter_tree_view" model="ir.ui.view">
227             <field name="name">mrp.routing.workcenter.tree</field>
228             <field name="model">mrp.routing.workcenter</field>
229             <field name="type">tree</field>
230             <field name="arch" type="xml">
231                 <tree string="Routing Work Centers">
232                     <field name="sequence"/>
233                     <field name="name"/>
234                     <field name="workcenter_id"/>
235                     <field name="cycle_nbr"/>
236                     <field name="hour_nbr"/>
237                     <field name="company_id" widget="selection" groups="base.group_multi_company"/>
238                 </tree>
239             </field>
240         </record>
241
242         <record id="mrp_routing_workcenter_form_view" model="ir.ui.view">
243             <field name="name">mrp.routing.workcenter.form</field>
244             <field name="model">mrp.routing.workcenter</field>
245             <field name="type">form</field>
246             <field name="arch" type="xml">
247                 <form string="Routing Work Centers" version="7.0">
248                     <group col="4" string="General Information">
249                         <field colspan="4" name="name"/>
250                         <field name="sequence"/>
251                         <field name="workcenter_id"/>
252                         <field name="cycle_nbr"/>
253                         <field name="hour_nbr" widget="float_time"/>
254                         <field name="company_id" widget="selection" groups="base.group_multi_company"/>
255                     </group>
256                     <label for="note"/>
257                     <field name="note"/>
258                 </form>
259             </field>
260         </record>
261
262         <record id="mrp_routing_form_view" model="ir.ui.view">
263             <field name="name">mrp.routing.form</field>
264             <field name="model">mrp.routing</field>
265             <field name="type">form</field>
266             <field name="arch" type="xml">
267                 <form string="Routing" version="7.0">
268                     <group col="4">
269                         <group>
270                             <field name="name"/>
271                             <field name="code"/>
272                         </group>
273                         <group>
274                             <field name="location_id"/>
275                             <field name="company_id" widget="selection" groups="base.group_multi_company"/>
276                             <field name="active"/>
277                        </group>
278                     </group>
279                     <notebook>
280                         <page string="Work Center Operations">
281                             <field name="workcenter_lines"/>
282                         </page>
283                         <page string="Notes">
284                             <field name="note"/>
285                         </page>
286                     </notebook>
287                 </form>
288             </field>
289         </record>
290         <record id="mrp_routing_tree_view" model="ir.ui.view">
291             <field name="name">mrp.routing.tree</field>
292             <field name="model">mrp.routing</field>
293             <field name="type">tree</field>
294             <field name="arch" type="xml">
295                 <tree string="Routing">
296                     <field name="code"/>
297                     <field name="name"/>
298                     <field name="location_id"/>
299                     <field name="company_id" groups="base.group_multi_company"/>
300                 </tree>
301             </field>
302         </record>
303         <record id="mrp_routing_search_view" model="ir.ui.view">
304             <field name="name">mrp.routing.search</field>
305             <field name="model">mrp.routing</field>
306             <field name="type">search</field>
307             <field name="arch" type="xml">
308                 <search string="Routing">
309                     <field name="name" string="Routing" filter_domain="['|',('name','ilike',self),('code','ilike',self)]"/>
310                     <separator orientation="vertical"/>
311                     <filter string="Inactive" icon="terp-gdu-smart-failing" domain="[('active','=',False)]"/>
312                     <separator orientation="vertical"/>
313                     <field name="location_id"/>
314                     <field name="company_id" groups="base.group_multi_company"/>
315                     <group expand="0" string="Group By...">
316                         <filter string="Production Location" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'location_id'}"/>
317                     </group>
318                 </search>
319             </field>
320         </record>
321         <record id="mrp_routing_action" model="ir.actions.act_window">
322             <field name="name">Routings</field>
323             <field name="type">ir.actions.act_window</field>
324             <field name="res_model">mrp.routing</field>
325             <field name="view_type">form</field>
326             <field name="view_id" ref="mrp_routing_tree_view"/>
327             <field name="search_view_id" ref="mrp_routing_search_view"/>
328             <field name="help">
329                 Routings allow you to create and manage the manufacturing operations that should be
330                 followed within your work centers in order to produce a product.
331                 They are attached to bills of materials that will define the required raw materials.
332             </field>
333         </record>
334         <menuitem action="mrp_routing_action" id="menu_mrp_routing_action" parent="mrp.menu_mrp_bom" groups="mrp.group_mrp_routings" sequence="15"/>
335
336         <!--
337           Bill of Materials
338         -->
339
340         <record id="mrp_bom_form_view" model="ir.ui.view">
341             <field name="name">mrp.bom.form</field>
342             <field name="model">mrp.bom</field>
343             <field name="type">form</field>
344             <field name="arch" type="xml">
345                 <form string="Bill of Material" version="7.0">
346                     <label for="product_id" string="Product and Quantity" class="oe_edit_only"/>
347                     <h1>
348                         <field name="product_id" on_change="onchange_product_id(product_id, name, context)" class="oe_inline"/>: 
349                         <field name="product_qty" class="oe_inline"/>
350                         <field name="product_uom" class="oe_inline" groups="product.group_uom"/>
351                     </h1>
352                     <div groups="mrp.group_mrp_routings">
353                         <label for="routing_id" class="oe_edit_only"/>
354                         <h2><field name="routing_id" class="oe_inline"/></h2>
355                     </div>
356                     <group>
357                         <group>
358                             <field name="name"/>
359                             <field name="code" string="Reference"/>
360                         </group>
361                         <group>
362                             <field name="type"/>
363                             <field name="company_id" groups="base.group_multi_company" widget="selection"/>
364                             <label for="product_uos_qty" groups="product.group_uos"/>
365                             <div groups="product.group_uos" >
366                                 <field name="product_uos_qty" 
367                                     class="oe_inline"/>
368                                 <label string="-" attrs="{'invisible':[('product_uos','=',False)]}" class="oe_inline"/> 
369                                 <field name="product_uos" class="oe_inline"/>
370                             </div>
371                         </group>
372                     </group>
373                     <notebook>
374                         <page string="Components">
375                             <field name="bom_lines" widget="one2many_list">
376                                 <tree string="Components" editable="bottom">
377                                     <field name="product_id" on_change="onchange_product_id(product_id, name)"/>
378                                     <field name="product_qty"/>
379                                     <field name="product_uom" groups="product.group_uom"/>
380                                     <field name="name" invisible="1"/>
381                                     <field name="date_start"/>
382                                     <field name="date_stop"/>
383                                 </tree>
384                             </field>
385                         </page>
386                         <page string="Revisions" attrs="{'invisible': [('bom_id','!=',False)]}">
387                             <field name="revision_ids"/>
388                         </page>
389                         <page string="Properties" groups="product.group_mrp_properties">
390                             <group>
391                                 <group>
392                                     <field name="position"/>
393                                     <field name="bom_id"/>
394                                     <field name="sequence"/>
395                                     <field name="active"/>
396                                 </group>
397                                 <group>
398                                     <field name="date_start"/>
399                                     <field name="date_stop"/>
400                                     <field name="product_rounding"/>
401                                     <field name="product_efficiency"/>
402                                 </group>
403                             </group>
404                             <separator string="Properties"/>
405                             <field name="property_ids" widget="many2many_tags" />
406                         </page>
407                     </notebook>
408                 </form>
409             </field>
410         </record>
411
412         <record id="view_mrp_bom_filter" model="ir.ui.view">
413             <field name="name">mrp.bom.select</field>
414             <field name="model">mrp.bom</field>
415            <field name="type">search</field>
416             <field name="arch" type="xml">
417                 <search string="Search Bill Of Material">
418                     <group>
419                          <field name="name" string="Bill Of Material" filter_domain="['|',('name','ilike',self),('code','ilike',self)]"/>
420                          <separator orientation="vertical"/>
421                          <field name="product_id"/>
422                          <field name="company_id" groups="base.group_multi_company"/>
423                     </group>
424                     <newline/>
425                     <group expand="0" string="Group By...">
426                         <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
427                         <filter string='Default Unit of Measure' icon="terp-mrp" domain="[]" context="{'group_by' : 'product_uom'}" />
428                         <separator orientation="vertical"/>
429                         <filter string="Routing" icon="terp-stock_align_left_24" domain="[]" context="{'group_by':'routing_id'}"/>
430                         <filter string='Type' icon="terp-stock_symbol-selection" domain="[]" context="{'group_by' : 'type'}" />
431                         <separator orientation="vertical"/>
432                         <filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_start'}" help="Starting Date"/>
433                    </group>
434                 </search>
435             </field>
436         </record>
437
438        <record id="mrp_bom_tree_view" model="ir.ui.view">
439             <field name="name">mrp.bom.tree</field>
440             <field name="model">mrp.bom</field>
441             <field name="type">tree</field>
442             <field name="field_parent">child_complete_ids</field>
443             <field name="arch" type="xml">
444                 <tree string="Bill of Materials" colors="blue:method">
445                     <field name="sequence" invisible="1"/>
446                     <field name="name"/>
447                     <field name="code"/>
448                     <field name="product_id"/>
449                     <field name="product_qty"/>
450                     <field name="product_uom" groups="product.group_uom"/>
451                     <field name="type"/>
452                     <field name="method"/>
453                     <field name="routing_id" groups="mrp.group_mrp_routings"/>
454                     <field name="date_start"/>
455                     <field name="date_stop"/>
456                 </tree>
457             </field>
458         </record>
459        <record id="mrp_bom_component_tree_view" model="ir.ui.view">
460             <field name="name">mrp.bom.component.tree</field>
461             <field name="model">mrp.bom</field>
462             <field name="type">tree</field>
463             <field name="field_parent">child_complete_ids</field>
464             <field name="arch" type="xml">
465                 <tree string="BoM Structure" colors="blue:method">
466                     <field name="sequence" invisible="1"/>
467                     <field name="name" string="Component Name"/>
468                     <field name="code"/>
469                     <field name="product_id" string="Component Product"/>
470                     <field name="bom_id"/>
471                     <field name="product_qty"/>
472                     <field name="product_uom" groups="product.group_uom"/>
473                     <field name="type"/>
474                     <field name="method"/>
475                     <field name="routing_id" groups="mrp.group_mrp_routings"/>
476                     <field name="date_start"/>
477                     <field name="date_stop"/>
478                 </tree>
479             </field>
480         </record>
481         <record id="mrp_bom_form_action" model="ir.actions.act_window">
482             <field name="name">Bill of Materials</field>
483             <field name="type">ir.actions.act_window</field>
484             <field name="res_model">mrp.bom</field>
485             <field name="view_type">form</field>
486             <field name="domain">[('bom_id','=',False)]</field>
487             <field name="search_view_id" ref="view_mrp_bom_filter"/>
488             <field name="help">
489                 Master Bills of Materials allow you to create and manage the list of necessary
490                 raw materials used to make a finished product.
491                 OpenERP uses these BoMs to automatically propose manufacturing orders according to product needs.
492                 You can either create a bill of materials to define specific production steps,
493                 or define a single multi-level bill of materials.
494             </field>
495         </record>
496         <record id="mrp_bom_form_action2" model="ir.actions.act_window">
497             <field name="name">Bill of Material Components</field>
498             <field name="type">ir.actions.act_window</field>
499             <field name="res_model">mrp.bom</field>
500             <field name="view_type">form</field>
501             <field name="view_id" ref="mrp_bom_component_tree_view"/>
502             <field name="domain">[('bom_id','!=',False)]</field>
503             <field name="help">
504                 Bills of materials components are components and sub-products used to create master bills of materials.
505                 Use this menu to search in which BoM a specific component is used.
506             </field>
507         </record>
508
509         <!-- BOM menus -->
510
511         <menuitem
512             action="mrp_bom_form_action"
513             id="menu_mrp_bom_form_action"
514             parent="menu_mrp_bom"
515             sequence="10"/>
516         <menuitem
517             action="mrp_bom_form_action2"
518             id="menu_mrp_bom_form_action2"
519             parent="menu_mrp_configuration"
520             sequence="20"/>
521
522         <record id="action2" model="ir.actions.act_window">
523             <field name="name">Bill of Materials Structure</field>
524             <field name="type">ir.actions.act_window</field>
525             <field name="res_model">mrp.bom</field>
526             <field name="domain">[('id','in',active_ids)]</field>
527             <field name="view_type">tree</field>
528             <field name="view_mode">tree</field>
529             <field name="view_id" ref="mrp_bom_tree_view"/>
530         </record>
531         <record id="ir_BOM_structure" model="ir.values">
532             <field eval="'client_action_multi'" name="key2"/>
533             <field eval="'mrp.bom'" name="model"/>
534             <field name="name">Bill of Materials Structure</field>
535             <field eval="'ir.actions.act_window,'+str(action2)" name="value"/>
536         </record>
537
538         <record id="mrp_bom_revision_tree" model="ir.ui.view">
539             <field name="name">mrp.bom.revision</field>
540             <field name="model">mrp.bom.revision</field>
541             <field name="type">tree</field>
542             <field name="arch" type="xml">
543                 <tree string="BoM Revisions">
544                     <field name="indice"/>
545                     <field name="author_id"/>
546                     <field name="date"/>
547                     <field colspan="4" name="name"/>
548                 </tree>
549             </field>
550         </record>
551         <record id="mrp_bom_revision_form" model="ir.ui.view">
552             <field name="name">mrp.bom.revision</field>
553             <field name="model">mrp.bom.revision</field>
554             <field name="type">form</field>
555             <field name="arch" type="xml">
556                 <form string="BoM Revisions" version="7.0">
557                     <group col="4">
558                         <field name="name"/>
559                         <field name="indice"/>
560                         <field name="date"/>
561                         <field name="author_id" readonly="1"/>
562                     </group>
563                     <separator string="Description"/>
564                     <field name="description"/>
565                 </form>
566             </field>
567         </record>
568
569         <!--
570         Production Management
571         -->
572         <record id="mrp_production_tree_view" model="ir.ui.view">
573             <field name="name">mrp.production.tree</field>
574             <field name="model">mrp.production</field>
575             <field name="type">tree</field>
576             <field name="arch" type="xml">
577                 <tree fonts="bold:needaction_pending==True" colors="blue:state in ('draft','confirmed');red:date_planned&lt;current_date and state not in ('done','cancel');black:date_planned&gt;=current_date;gray:state in ('done','cancel') " string="Manufacturing Orders">
578                     <field name="needaction_pending" invisible="1"/>
579                     <field name="name"/>
580                     <field name="date_planned"/>
581                     <field name="product_id"/>
582                     <field name="product_qty" sum="Total Qty"/>
583                     <field name="product_uom" groups="product.group_uom"/>
584                     <field name="routing_id" groups="mrp.group_mrp_routings"/>
585                     <field name="hour_total" sum="Total Hours"/>
586                     <field name="cycle_total" sum="Total Cycles"/>
587                     <field name="origin"/>
588                     <field name="state"/>
589                 </tree>
590             </field>
591         </record>
592
593         <record id="view_production_calendar" model="ir.ui.view">
594             <field name="name">mrp.production.calendar</field>
595             <field name="model">mrp.production</field>
596             <field name="type">calendar</field>
597             <field eval="2" name="priority"/>
598             <field name="arch" type="xml">
599                 <calendar color="routing_id" date_start="date_planned" string="Manufacturing Orders">
600                     <field name="name"/>
601                     <field name="product_id"/>
602                     <field name="product_qty"/>
603                 </calendar>
604             </field>
605         </record>
606
607
608         <record id="view_production_gantt" model="ir.ui.view">
609             <field name="name">mrp.production.gantt</field>
610             <field name="model">mrp.production</field>
611             <field name="type">gantt</field>
612             <field name="arch" type="xml">
613                 <gantt date_stop="date_finished" date_start="date_start" string="Productions" default_group_by="routing_id">
614                 </gantt>
615             </field>
616         </record>
617
618
619         <record model="ir.ui.view" id="view_production_graph">
620             <field name="name">mrp.production.graph</field>
621             <field name="model">mrp.production</field>
622             <field name="type">graph</field>
623             <field name="arch" type="xml">
624                 <graph string="Manufacturing Orders" type="bar">
625                     <field name="date_planned_date"/>
626                     <field name="hour_total" operator="+"/>
627                     <field name="cycle_total" operator="+"/>
628                 </graph>
629             </field>
630         </record>
631
632         <record id="mrp_production_form_view" model="ir.ui.view">
633             <field name="name">mrp.production.form</field>
634             <field name="model">mrp.production</field>
635             <field name="type">form</field>
636             <field name="arch" type="xml">
637                 <form string="Manufacturing Orders" version="7.0">
638                 <header>
639                     <button name="button_confirm" states="draft" string="Confirm Production" class="oe_highlight"/>
640                     <button name="button_produce" states="ready" string="Start Production" class="oe_highlight"/>
641                     <button name="%(act_mrp_product_produce)d" states="in_production" string="Produce" type="action" class="oe_highlight"/>
642                     <button name="force_production" states="confirmed" string="Force Reservation" type="object" class="oe_highlight"/>
643                     <button name="force_production" states="picking_except" string="Force Reservation" type="object"/>
644                     <button name="button_recreate" states="picking_except" string="Recreate Picking"/>
645                     <button name="button_cancel" states="draft,ready,in_production,picking_except" string="Cancel"/>
646                     <button name="action_cancel" type="object" states="confirmed" string="Cancel"/>
647                     <field name="state" widget="statusbar" statusbar_visible="draft,ready,in_production,done" statusbar_colors='{"picking_except":"red","confirmed":"blue"}'/>
648                 </header>
649                 <sheet>
650                     <label for="product_id" class="oe_edit_only"/>
651                     <h1>
652                         <field name="product_id" on_change="product_id_change(product_id)" domain="[('supply_method','=','produce')]" class="oe_inline"/>
653                     </h1>
654                     <label for="product_qty" class="oe_edit_only"/>
655                     <h2>
656                         <field name="product_qty" class="oe_inline"/>
657                         <field name="product_uom" groups="product.group_uom" class="oe_inline"/>
658                         <button type="action"
659                             icon="terp-accessories-archiver+"
660                             name="%(mrp.action_change_production_qty)d"
661                             string="Change Qty" states="ready,confirmed" class="oe_inline"/>
662                     </h2>
663                     <div groups="mrp.group_mrp_routings">
664                         <label for="routing_id" class="oe_edit_only"/>
665                         <h2><field name="routing_id" class="oe_inline"/></h2>
666                     </div>
667                     <group>
668                         <group>
669                             <field name="name"/>
670                             <field name="date_planned"/>
671                             <field name="origin"/>
672                         </group>
673                         <group>
674                             <field name="user_id"/>
675                             <label for="product_uos_qty" groups="product.group_uos"/>
676                             <div groups="product.group_uos">
677                                 <field name="product_uos_qty" class="oe_inline"/>
678                                 <label string="-" attrs="{'invisible':[('product_uos','=',False)]}" class="oe_inline"/>
679                                 <field name="product_uos" class="oe_inline"/>
680                             </div>
681                         </group>
682                     </group>
683                     <notebook>
684                         <page string="Consumed Products">
685                             <group>
686                                 <group groups="stock.group_locations">
687                                     <field name="bom_id" domain="[('product_id','=',product_id)]" context="{'default_product_id': product_id}" on_change="bom_id_change(bom_id)"/>
688                                 </group>
689                                 <group>
690                                     <field name="location_src_id" domain="[('usage','=','internal')]" on_change="location_id_change(location_src_id,location_dest_id)"/>
691                                     <field name="location_dest_id" domain="[('usage','=','internal')]"/>
692                                 </group>
693                             </group>
694                             <group>
695                                 <group string="Products to Consume">
696                                     <field name="move_lines" domain="[('state','&lt;&gt;', ('done', 'cancel'))]" nolabel="1">
697                                         <tree colors="blue:state == 'draft';black:state in ('picking_except','confirmed','ready','in_production');gray:state in ('cancel','done') " string="Products to Consume">
698                                             <field name="product_id" />
699                                             <field name="product_qty"  string="Quantity"/>
700                                             <field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
701                                             <field name="location_id"  string="Source Loc." groups="stock.group_locations"/>
702                                             <field name="state" invisible="1"/>
703                                             <button name="%(stock.move_consume)d"
704                                                 string="Consume Products" type="action"
705                                                 icon="gtk-go-forward" context="{'consume': True}"
706                                                 states="draft,waiting,confirmed,assigned" />
707                                             <button
708                                                    name="%(stock.track_line)d"
709                                                    string="Split in Serial Numbers"
710                                                    type="action" icon="gtk-justify-fill"
711                                                    states="draft,waiting,confirmed,assigned" />
712                                             <button name="%(stock.move_scrap)d"
713                                                 string="Scrap Products" type="action"
714                                                 icon="gtk-convert" context="{'scrap': True}"
715                                                 states="draft,waiting,confirmed,assigned"/>
716                                         </tree>
717                                     </field>
718                                 </group>
719                                 <group string="Consumed Product">
720                                     <field name="move_lines2" domain="[('state','in', ('done', 'cancel'))]" nolabel="1">
721                                        <tree colors="red:scrapped==True;blue:state == 'draft';black:state in('picking_except','confirmed','ready','in_production');gray:state == 'cancel' " string="Consumed Products" editable="bottom">
722                                            <field name="product_id" readonly="1"/>
723                                            <field name="product_qty" readonly="1"/>
724                                            <field name="product_uom" readonly="1" string="Unit of Measure" groups="product.group_uom"/>
725                                            <field name="prodlot_id" context="{'product_id': product_id}"/>
726                                            <field name="state" invisible="1"/>
727                                            <field name="scrapped" invisible="1"/>
728                                            <button
729                                                name="%(stock.move_scrap)d"
730                                                string="Scrap Products" type="action"
731                                                icon="gtk-convert"
732                                                states="done,cancel"/>
733                                        </tree>
734                                     </field>
735                                 </group>
736                             </group>
737                         </page>
738                         <page string="Finished Products">
739                             <group>
740                                 <group string="Products to Produce">
741                                     <field name="move_created_ids" domain="[('state','&lt;&gt;', ('done', 'cancel'))]" nolabel="1">
742                                         <tree string="Products to Finish">
743                                             <field name="product_id" />
744                                             <field name="product_qty"/>
745                                             <field name="product_uom"  string="Unit of Measure" groups="product.group_uom"/>
746                                             <field name="state" invisible="1"/>
747                                             <button name="%(stock.action_partial_move_server)d"
748                                                 string="Partial"
749                                                 type="action" states="confirmed,assigned"
750                                                 icon="gtk-justify-fill"/>
751                                             <button name="%(stock.move_scrap)d"
752                                                 string="Scrap Products" type="action"
753                                                 icon="gtk-convert" context="{'scrap': True}"
754                                                 states="draft,waiting,confirmed,assigned" />
755                                         </tree>
756                                     </field>
757                                 </group>
758                                 <group string="Produced Products">
759                                     <field name="move_created_ids2" domain="[('state','in', ('done', 'cancel'))]" nolabel="1">
760                                         <tree colors="red:scrapped==True;blue:state == 'draft';black:state in('picking_except','confirmed','ready','in_production');gray:state in('cancel','done') " string="Finished Products">
761                                             <field name="product_id" readonly="1"/>
762                                             <field name="product_qty" readonly="1"/>
763                                             <field name="product_uom" readonly="1" string="Unit of Measure"/>
764                                             <field name="location_dest_id"  readonly="1" string="Destination Loc." widget="selection"/>
765                                             <field name="prodlot_id" context="{'product_id': product_id}"/>
766                                             <field name="scrapped" invisible="1"/>
767                                             <field name="state" invisible="1"/>
768                                             <button name="%(stock.track_line)d"
769                                                  string="Split in Serial Numbers" type="action" icon="gtk-justify-fill" states="done,cancel"/>
770                                             <button name="%(stock.move_scrap)d"
771                                                 string="Scrap Products" type="action" icon="gtk-convert"
772                                                 states="done,cancel" />
773                                         </tree>
774                                     </field>
775                                 </group>
776                             </group>
777                         </page>
778                         <page string="Work Orders">
779                             <button name="action_compute" states="draft"
780                                 string="Compute Data" type="object"
781                                 icon="terp-stock_format-scientific"/>
782                             <field name="workcenter_lines">
783                                 <form string="Production Work Centers" version="7.0">
784                                     <group col="4">
785                                         <field colspan="4" name="name"/>
786                                         <field name="workcenter_id"/>
787                                         <field name="sequence"/>
788                                         <field name="cycle"/>
789                                         <field name="hour"/>
790                                     </group>
791                                 </form>
792                                 <tree string="Production Work Centers">
793                                     <field name="sequence"/>
794                                     <field name="name"/>
795                                     <field name="workcenter_id"/>
796                                     <field name="cycle"/>
797                                     <field name="hour"/>
798                                 </tree>
799                             </field>
800                         </page>
801                         <page string="Scheduled Products">
802                             <button name="action_compute" states="draft"
803                                 string="Compute Data" type="object"
804                                 icon="terp-stock_format-scientific"/>
805                             <field name="product_lines"/>
806                         </page>
807                         <page string="Extra Information">
808                             <group>
809                                 <group>
810                                     <field name="priority"/>
811                                     <field name="date_start"/>
812                                     <field name="date_finished"/>
813                                 </group>
814                                 <group>
815                                     <field name="company_id" groups="base.group_multi_company" widget="selection"/>
816                                     <field name="picking_id"/>
817                                     <field name="move_prod_id" groups="stock.group_locations"/>
818                                 </group>
819                             </group>
820                         </page>
821                     </notebook>
822                 </sheet>
823                 <div class="oe_chatter">
824                     <field name="message_ids" widget="mail_thread"/>
825                 </div>
826                 </form>
827             </field>
828         </record>
829
830         <record id="view_mrp_production_filter" model="ir.ui.view">
831             <field name="name">mrp.production.select</field>
832             <field name="model">mrp.production</field>
833             <field name="type">search</field>
834             <field name="arch" type="xml">
835                 <search string="Search Production">
836                    <group>
837                        <field name="name" string="Production" filter_domain="['|',('name','ilike',self),('origin','ilike',self)]"/>
838                        <separator orientation="vertical"/>
839                        <filter icon="terp-gtk-media-pause" string="Pending" name="pending"
840                            domain="[('state','=','confirmed')]"
841                            help="Manufacturing Orders which are waiting for raw materials."/>
842                        <filter icon="terp-camera_test" string="Ready" name="ready"
843                            domain="[('state','=','ready')]"
844                            help="Manufacturing Orders which are ready to start production."/>
845                        <filter icon="terp-check" string="In Production" name="inprogress"
846                            domain="[('state','=','in_production')]"
847                            help="Manufacturing Orders which are currently in production."/>
848                        <filter icon="terp-gnome-cpu-frequency-applet+" string="Late"
849                            domain="['&amp;', ('date_planned','&lt;', current_date), ('state', 'in', ('draft', 'confirmed', 'ready'))]"
850                            help="Production started late" />
851                        <separator orientation="vertical"/>
852                        <field name="product_id"/>
853                        <field name="routing_id" groups="mrp.group_mrp_routings"/>
854                     </group>
855                     <newline/>
856                     <group expand="0" string="Group By...">
857                         <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
858                         <separator orientation="vertical"/>
859                         <filter string="Routing" icon="terp-stock_align_left_24" domain="[]" context="{'group_by':'routing_id'}"/>
860                         <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
861                         <separator orientation="vertical"/>
862                         <filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_planned'}" help="Scheduled Date"/>
863                     </group>
864                </search>
865             </field>
866         </record>
867
868         <record id="mrp_production_action" model="ir.actions.act_window">
869             <field name="name">Manufacturing Orders</field>
870             <field name="type">ir.actions.act_window</field>
871             <field name="res_model">mrp.production</field>
872             <field name="view_type">form</field>
873             <field name="view_mode">tree,form,calendar,graph,gantt</field>
874             <field name="view_id" eval="False"/>
875             <field name="search_view_id" ref="view_mrp_production_filter"/>
876             <field name="context">{}</field>
877             <field name="help">
878                 Click here to create a new Manufacturing Order.
879                 &lt;p&gt;
880                 To process the production, do not forget to create a Bill of Material.
881                 Manufacturing orders can be automatically generated based on procurement rules specified on the product.
882             </field>
883         </record>
884         <menuitem action="mrp_production_action" id="menu_mrp_production_action"
885             parent="menu_mrp_manufacturing" sequence="1"/>
886
887         <record id="mrp_production_action_planning" model="ir.actions.act_window">
888             <field name="name">Manufacturing Orders</field>
889             <field name="type">ir.actions.act_window</field>
890             <field name="res_model">mrp.production</field>
891             <field name="view_type">form</field>
892             <field name="view_mode">calendar,tree,form,graph</field>
893             <field name="domain">[('state','in',('ready','confirmed','in_production'))]</field>
894             <field name="help">
895                 Manufacturing Orders describe the operations that need to be carried out,
896                 and the raw materials usage for each production stage.
897                 You use specifications (bills of materials or BoM) to work out the raw material requirements
898                 and the manufacturing orders needed for the finished products.
899                 Once the bills of materials have been defined, OpenERP is capable of automatically deciding
900                 on the manufacturing route depending on the needs of the company.
901             </field>
902         </record>
903
904         <record id="mrp_production_action2" model="ir.actions.act_window">
905             <field name="name">Manufacturing Orders To Start</field>
906             <field name="type">ir.actions.act_window</field>
907             <field name="res_model">mrp.production</field>
908             <field name="view_type">form</field>
909             <field name="view_mode">tree,form,calendar,graph,gantt</field>
910             <field name="domain">[('state','=','ready')]</field>
911             <field name="filter" eval="True"/>
912             <field name="search_view_id" ref="view_mrp_production_filter"/>
913         </record>
914
915         <record id="mrp_production_action3" model="ir.actions.act_window">
916             <field name="name">Manufacturing Orders in Progress</field>
917             <field name="type">ir.actions.act_window</field>
918             <field name="res_model">mrp.production</field>
919             <field name="view_type">form</field>
920             <field name="view_mode">tree,form,calendar,graph,gantt</field>
921             <field name="domain">[('state','=','in_production')]</field>
922             <field name="filter" eval="True"/>
923             <field name="search_view_id" ref="view_mrp_production_filter"/>
924         </record>
925
926         <record id="mrp_production_action4" model="ir.actions.act_window">
927             <field name="name">Manufacturing Orders Waiting Products</field>
928             <field name="type">ir.actions.act_window</field>
929             <field name="res_model">mrp.production</field>
930             <field name="view_type">form</field>
931             <field name="view_mode">tree,form,calendar,graph,gantt</field>
932             <field name="domain">[('state','=','confirmed')]</field>
933             <field name="filter" eval="True"/>
934             <field name="search_view_id" ref="view_mrp_production_filter"/>
935         </record>
936
937         <record id="mrp_production_product_form_view" model="ir.ui.view">
938             <field name="name">mrp.production.product.line.form</field>
939             <field name="model">mrp.production.product.line</field>
940             <field name="type">form</field>
941             <field name="arch" type="xml">
942                 <form string="Scheduled Products" version="7.0">
943                     <group col="4">
944                         <field name="name"/>
945                         <field name="product_id"/>
946                         <field name="product_qty"/>
947                         <field name="product_uom" groups="product.group_uom"/>
948                         <field name="product_uos_qty" groups="product.group_uos"/>
949                         <field name="product_uos" groups="product.group_uos"/>
950                     </group>
951                 </form>
952             </field>
953         </record>
954         <record id="mrp_production_product_tree_view" model="ir.ui.view">
955             <field name="name">mrp.production.product.line.tree</field>
956             <field name="model">mrp.production.product.line</field>
957             <field name="type">tree</field>
958             <field name="arch" type="xml">
959                 <tree string="Scheduled Products">
960                     <field name="product_id"/>
961                     <field name="product_qty"/>
962                     <field name="product_uom" groups="product.group_uom"/>
963                     <field name="product_uos_qty" groups="product.group_uos"/>
964                     <field name="product_uos" groups="product.group_uos"/>
965                 </tree>
966             </field>
967         </record>
968
969         <!--
970             Procurements
971         -->
972
973         <record id="view_procurement_form_inherit" model="ir.ui.view">
974             <field name="name">procurement.order.form.inherit</field>
975             <field name="model">procurement.order</field>
976             <field name="inherit_id" ref="procurement.procurement_form_view"/>
977             <field name="type">form</field>
978             <field name="arch" type="xml">
979             <data>
980                 <xpath expr="//field[@name='move_id']" position="before">
981                     <field name="bom_id" domain="[('product_id','=',product_id),('bom_id','=',False)]"/>
982                 </xpath>
983                 <xpath expr="//field[@name='close_move']" position="after">
984                     <group colspan="4"  groups="product.group_mrp_properties">
985                         <field colspan="4" name="property_ids" widget="many2many_tags"/>
986                     </group>
987                 </xpath>
988                </data>
989             </field>
990         </record>
991
992         <record id="product_normal_form_view" model="ir.ui.view">
993             <field name="name">product.normal.form.mrp.inherit</field>
994             <field name="model">product.product</field>
995             <field name="type">form</field>
996             <field name="inherit_id" ref="product.product_normal_form_view"/>
997             <field name="arch" type="xml">
998                 <page string="Procurement &amp; Locations" position="inside">
999                     <separator string="Bill of Materials"/>
1000                     <field name="bom_ids" widget="one2many_list" mode="tree" context="{'default_product_id': active_id}">
1001                         <tree string="Bill of Materials">
1002                             <field name="name" string="Component Name"/>
1003                             <field name="bom_id"/>
1004                             <field name="product_qty" string="Quantity of Product"/>
1005                             <field name="type"/>
1006                             <field name="date_start"/>
1007                             <field name="date_stop"/>
1008                         </tree>
1009                     </field>
1010                 </page>
1011             </field>
1012         </record>
1013
1014         <act_window
1015             context="{'search_default_product_id': [active_id]}"
1016             id="act_product_manufacturing_open"
1017             name="Manufacturing Orders"
1018             view_id="mrp_production_tree_view"
1019             res_model="mrp.production"
1020             src_model="product.product"/>
1021
1022         <act_window
1023             id="action_product_bom_structure"
1024             name="Product BoM Structure"
1025             domain="[('product_id', 'in', active_ids),('bom_id','=',False)]"
1026             context="{'default_product_id': active_id}"
1027             view_type="tree"
1028             view_mode="tree"
1029             view_id="mrp_bom_tree_view"
1030             res_model="mrp.bom"
1031             src_model="product.product"
1032             groups="mrp.group_mrp_user"/>
1033
1034         <!-- Menu for Resource for MRP-->
1035
1036         <record id="mrp_workcenter_action" model="ir.actions.act_window">
1037             <field name="name">Work Center</field>
1038             <field name="type">ir.actions.act_window</field>
1039             <field name="res_model">mrp.workcenter</field>
1040             <field name="view_type">form</field>
1041             <field name="view_id" ref="mrp_workcenter_tree_view"/>
1042             <field name="search_view_id" ref="view_mrp_workcenter_search"/>
1043             <field name="help">
1044                 Work Centers allow you to create and manage manufacturing units.
1045                 They consist of workers and/or machines, which are considered as units for capacity and planning forecast.
1046                 Keep in mind that the working time and resource leave are not taken into account in the time computation
1047                 of the work center.
1048             </field>
1049         </record>
1050
1051         <menuitem id="menu_pm_resources_config" name="Resources" parent="menu_mrp_configuration"/>
1052         <menuitem action="mrp_workcenter_action" id="menu_view_resource_search_mrp" groups="mrp.group_mrp_routings" parent="mrp.menu_mrp_configuration" sequence="25"/>
1053         <menuitem action="resource.action_resource_calendar_form" id="menu_view_resource_calendar_search_mrp" parent="menu_pm_resources_config" sequence="1" groups="base.group_no_one"/>
1054         <menuitem action="resource.action_resource_calendar_leave_tree" id="menu_view_resource_calendar_leaves_search_mrp" parent="menu_pm_resources_config" sequence="1" groups="base.group_no_one"/>
1055
1056         <!-- Planning -->
1057
1058         <menuitem id="menu_mrp_planning" name="Planning"
1059                 parent="base.menu_mrp_root" sequence="2"/>
1060         <menuitem action="mrp.mrp_production_action_planning"
1061                 id="menu_mrp_production_order_action" name="Orders Planning"
1062                 parent="menu_mrp_planning" sequence="1"/>
1063
1064     </data>
1065 </openerp>