5 <record id="mrp_production_form_inherit_view" model="ir.ui.view">
6 <field name="name">mrp.production.form.inherit</field>
7 <field name="model">mrp.production</field>
8 <field name="inherit_id" ref="mrp.mrp_production_form_view"/>
9 <field name="arch" type="xml">
10 <xpath expr="//field[@name='workcenter_lines']/form//field[@name='name']" position="before">
12 <button name="button_start_working" string="Start" states="draft" icon="terp-gtk-jump-to-ltr" help="Start Working"/>
13 <button name="button_cancel" string="Cancel" states="draft,startworking" icon="gtk-stop" help="Cancel Order"/>
14 <button name="button_draft" string="Set Draft" states="cancel" icon="gtk-convert" help="Set to Draft"/>
15 <button name="button_resume" string="Resume" states="pause" icon="gtk-media-pause" help="Resume Work Order"/>
16 <button name="button_pause" string="Pending" states="startworking" icon="gtk-media-pause" help="Pause Work Order"/>
17 <button name="button_done" string="Finished" states="startworking" icon="terp-check" help="Finish Order"/>
18 <field name="state" widget="statusbar"/>
24 <record id="mrp_production_form_inherit_view2" model="ir.ui.view">
25 <field name="name">mrp.production.form.inherit2</field>
26 <field name="model">mrp.production</field>
27 <field name="inherit_id" ref="mrp.mrp_production_form_view"/>
28 <field name="arch" type="xml">
29 <xpath expr="//field[@name='workcenter_lines']/tree/field[@name='hour']" position="after">
31 <button name="button_draft" string="Set Draft" states="cancel" icon="gtk-convert"/>
32 <button name="button_start_working" string="Start" states="draft" icon="terp-gtk-jump-to-ltr"/>
33 <button name="button_resume" string="Resume" states="pause" icon="gtk-media-pause"/>
34 <button name="button_pause" string="Pending" states="startworking" icon="gtk-media-pause"/>
35 <button name="button_done" string="Finished" states="startworking" icon="terp-check"/>
40 <record model="ir.ui.view" id="mrp_production_workcenter_tree_view_inherit">
41 <field name="name">mrp.production.workcenter.line.tree</field>
42 <field name="model">mrp.production.workcenter.line</field>
43 <field name="inherit_id" eval="False"/>
44 <field name="arch" type="xml">
45 <tree string="Work Orders" colors="gray:state in ('done','cancel');black:state in ('draft','startworking') and date_planned>=current_date;red:date_planned<current_date and state in ('draft', 'confirmed', 'ready')">
46 <field name="production_id"/>
47 <field name="date_planned"/>
48 <field name="product"/>
52 <field name="workcenter_id" widget="selection"/>
55 <field name="state" />
60 <record model="ir.ui.view" id="mrp_production_workcenter_form_view_inherit">
61 <field name="name">mrp.production.workcenter.line.form</field>
62 <field name="model">mrp.production.workcenter.line</field>
63 <field name="inherit_id" eval="False"/>
64 <field name="arch" type="xml">
65 <form string="Production Workcenter" version="7.0">
67 <button name="button_start_working" string="Start" states="draft" class="oe_highlight"/>
68 <button name="button_resume" string="Resume" states="pause" class="oe_highlight"/>
69 <button name="button_done" string="Finished" states="startworking" class="oe_highlight"/>
70 <button name="button_pause" string="Pending" states="startworking"/>
71 <button name="button_draft" string="Set Draft" states="cancel"/>
72 <button name="button_cancel" string="Cancel" states="draft,startworking"/>
73 <field name="state" widget="statusbar" statusbar_visible="draft,startworking"/>
75 <sheet string="Work Orders">
77 <field colspan="2" name="name"/>
78 <field name="workcenter_id"/>
79 <field name="production_id" on_change="onchange_production_id(production_id)"/>
80 <field name="production_state"/>
81 <field name="sequence"/>
84 <page string="Information">
86 <group string="Planned Date">
87 <field name="date_planned"/>
88 <field name="date_planned_end"/>
91 <group string="Duration">
93 <field name="hour" widget="float_time"/>
95 <group string="Actual Production Date" >
96 <field name="date_start" readonly="1"/>
97 <field name="date_finished" readonly="1"/>
98 <field name="delay" widget="float_time"/>
100 <group string="Product to Produce">
101 <field name="product"/>
103 <field name="uom" widget="selection"/>
109 <div class="oe_chatter">
110 <field name="message_follower_ids" widget="mail_followers"/>
111 <field name="message_ids" widget="mail_thread"/>
117 <record id="view_mrp_production_workcenter_form_view_filter" model="ir.ui.view">
118 <field name="name">mrp.production.workcenter.line.select</field>
119 <field name="model">mrp.production.workcenter.line</field>
120 <field name="arch" type="xml">
121 <search string="Search Work Orders">
122 <field name="name" string="Work Orders"/>
123 <field name="date_planned"/>
124 <field name="state"/>
125 <filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]"/>
126 <filter icon="terp-check" string="In Progress" name="Current" domain="[('state','=','startworking')]"/>
127 <filter icon="terp-gtk-media-pause" string="Pending" domain="[('state','=','pause')]"/>
129 <filter icon="terp-gnome-cpu-frequency-applet+" string="Late" domain="['&', ('date_planned','<', current_date), ('state', 'in', ('draft', 'confirmed', 'ready'))]"
130 help="Production started late"/>
131 <field name="workcenter_id"/>
132 <field name="production_id"/>
133 <group expand="0" string="Group By...">
134 <filter string="Work Center" icon="terp-go-home" domain="[]" context="{'group_by':'workcenter_id'}"/>
135 <filter string="Production" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'production_id'}"/>
136 <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
137 <filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_planned'}"/>
143 <record id="workcenter_line_calendar" model="ir.ui.view">
144 <field name="name">mrp.production.workcenter.line.calendar</field>
145 <field name="model">mrp.production.workcenter.line</field>
146 <field name="arch" type="xml">
147 <calendar color="product" date_stop="date_finished" date_start="date_start" string="Operations">
148 <field name="workcenter_id"/>
149 <field name="production_id"/>
155 <record id="workcenter_line_gantt" model="ir.ui.view">
156 <field name="name">mrp.production.workcenter.line.gantt</field>
157 <field name="model">mrp.production.workcenter.line</field>
158 <field name="arch" type="xml">
159 <gantt date_delay="hour" date_start="date_planned" string="Operations" default_group_by="production_id">
165 <!-- Action for All Operations -->
167 <record model="ir.actions.act_window" id="mrp_production_wc_action_form">
168 <field name="name">Work Orders</field>
169 <field name="type">ir.actions.act_window</field>
170 <field name="res_model">mrp.production.workcenter.line</field>
171 <field name="view_type">form</field>
172 <field name="view_mode">tree,form,gantt,calendar,graph</field>
173 <field name="search_view_id" ref="view_mrp_production_workcenter_form_view_filter"/>
174 <field name="help" type="html">
175 <p class="oe_view_nocontent_create">
176 Click to start a new work order.
178 Work Orders is the list of operations to be performed for each
179 manufacturing order. Once you start the first work order of a
180 manufacturing order, the manufacturing order is automatically
181 marked as started. Once you finish the latest operation of a
182 manufacturing order, the MO is automatically done and the related
183 products are produced.
188 <record model="ir.actions.act_window" id="mrp_production_wc_action_planning">
189 <field name="name">Work Orders Planning</field>
190 <field name="type">ir.actions.act_window</field>
191 <field name="res_model">mrp.production.workcenter.line</field>
192 <field name="view_type">form</field>
193 <field name="domain">[('production_state','in',('ready','confirmed','in_production'))]</field>
194 <field name="view_mode">gantt,tree,form,graph,calendar</field>
195 <field name="help" type="html">
196 <p class="oe_view_nocontent_create">
197 Click to start a new work order.
199 To manufacture or assemble products, and use raw materials and
200 finished products you must also handle manufacturing operations.
201 Manufacturing operations are often called Work Orders. The various
202 operations will have different impacts on the costs of
203 manufacturing and planning depending on the available workload.
209 <record id="workcenter_line_resource_gantt" model="ir.ui.view">
210 <field name="name">mrp.production.workcenter.line.resource.gantt</field>
211 <field name="model">mrp.production.workcenter.line</field>
212 <field name="arch" type="xml">
213 <gantt date_delay="hour" date_start="date_planned" default_group_by="workcenter_id">
218 <record model="ir.actions.act_window" id="mrp_production_wc_resource_planning">
219 <field name="name">Work Centers</field>
220 <field name="type">ir.actions.act_window</field>
221 <field name="res_model">mrp.production.workcenter.line</field>
222 <field name="view_type">form</field>
223 <field name="domain">[('production_state','in',('ready','confirmed','in_production'))]</field>
224 <field name="view_mode">gantt,tree,form,calendar,graph</field>
225 <field name="view_id" ref="workcenter_line_resource_gantt"/>
228 <!-- Action for Confirm Operations -->
230 <record model="ir.actions.act_window" id="mrp_production_wc_confirm_action">
231 <field name="name">Confirmed Work Orders</field>
232 <field name="type">ir.actions.act_window</field>
233 <field name="res_model">mrp.production.workcenter.line</field>
234 <field name="view_type">form</field>
235 <field name="view_mode">tree,form,graph,gantt,calendar</field>
236 <field name="domain">[('production_state','=','ready')]</field>
237 <field name="filter" eval="True"/>
240 <!-- Action for Draft Operations -->
242 <record model="ir.actions.act_window" id="mrp_production_wc_draft_action">
243 <field name="name">Future Work Orders</field>
244 <field name="type">ir.actions.act_window</field>
245 <field name="res_model">mrp.production.workcenter.line</field>
246 <field name="view_type">form</field>
247 <field name="view_mode">tree,form,graph</field>
248 <field name="domain">[('state','=','draft')]</field>
249 <field name="filter" eval="True"/>
252 <record model="ir.values" id="mrp_production_wc_action_open">
253 <field name="key2" eval="'tree_but_open'"/>
254 <field name="model" eval="'mrp.production.workcenter.line'"/>
255 <field name="name">Work Orders</field>
256 <field name="value" eval="'ir.actions.act_window,'+str(mrp_production_wc_action_form)"/>
259 <menuitem name="Work Orders" parent="mrp.menu_mrp_manufacturing"
260 id="menu_mrp_production_wc_order"
261 action="mrp_production_wc_action_form"
263 <menuitem name="Work Orders By Resource" parent="mrp.menu_mrp_planning"
264 id="menu_mrp_production_wc_action_planning"
265 action="mrp_production_wc_action_planning"
267 icon="STOCK_INDENT"/>
268 <!-- <menuitem parent="mrp.menu_mrp_planning"
269 id="menu_mrp_production_wc_resource_planning"
270 action="mrp_production_wc_resource_planning"
271 icon="STOCK_INDENT"/>-->
273 <!-- Operation codes -->
275 <record model="ir.ui.view" id="mrp_production_code_tree_view">
276 <field name="name">mrp.production.code.tree</field>
277 <field name="model">mrp_operations.operation.code</field>
278 <field name="arch" type="xml">
279 <tree string="Production Operation Code">
282 <field name="start_stop"/>
286 <record model="ir.ui.view" id="mrp_production_code_form_view">
287 <field name="name">mrp.production.code.form</field>
288 <field name="model">mrp_operations.operation.code</field>
289 <field name="arch" type="xml">
290 <form string="Production Operation Code" version="7.0">
294 <field name="start_stop"/>
300 <record model="ir.actions.act_window" id="mrp_production_code_action">
301 <field name="name">Operation Codes</field>
302 <field name="type">ir.actions.act_window</field>
303 <field name="res_model">mrp_operations.operation.code</field>
304 <field name="view_type">form</field>
305 <field name="view_mode">tree,form</field>
306 <field name="view_id" ref="mrp_production_code_tree_view"/>
311 <record model="ir.ui.view" id="mrp_production_operation_tree_view">
312 <field name="name">mrp.production.operation.tree</field>
313 <field name="model">mrp_operations.operation</field>
314 <field name="arch" type="xml">
315 <tree string="Production Operation" editable="top">
316 <field name="production_id"/>
317 <field name="workcenter_id"/>
318 <field name="code_id"/>
319 <field name="date_start"/>
320 <field name="date_finished"/>
321 <field name="order_date"/>
326 <record id="graph_in_hrs_workcenter" model="ir.ui.view">
327 <field name="name">graph.in.hrs.workcenter</field>
328 <field name="model">mrp.production.workcenter.line</field>
329 <field name="arch" type="xml">
330 <graph string="Hours by Work Center" type="bar">
331 <field name="date_start"/>
332 <field name="hour" operator="+"/>
333 <field name="workcenter_id" group="True"/>
338 <record model="ir.actions.act_window" id="mrp_production_operation_action">
339 <field name="name">Operations</field>
340 <field name="type">ir.actions.act_window</field>
341 <field name="res_model">mrp_operations.operation</field>
342 <field name="view_type">form</field>
343 <field name="view_mode">tree,calendar,form</field>
344 <field name="view_id" ref="mrp_production_operation_tree_view"/>
346 <record id="mrp_production_reorder_form_view" model="ir.ui.view">
347 <field name="name">mrp.production.allow_reorder.form</field>
348 <field name="inherit_id" ref="mrp.mrp_production_form_view"/>
349 <field name="model">mrp.production</field>
350 <field name="arch" type="xml">
351 <field name="date_finished" position="after">
352 <field name="allow_reorder"/>
357 <record model="ir.ui.view" id="operation_calendar_view">
358 <field name="name">mrp.perations.calendar</field>
359 <field name="model">mrp_operations.operation</field>
360 <field name="priority" eval="2"/>
361 <field name="arch" type="xml">
362 <calendar string="Calendar View" date_start="order_date" color="workcenter_id">
363 <field name="date_start"/>
364 <field name="date_finished"/>