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