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