1 <?xml version="1.0" encoding="utf-8"?>
8 <record id="view_report_mrp_workorder_tree" model="ir.ui.view">
9 <field name="name">mrp.workorder.tree</field>
10 <field name="model">mrp.workorder</field>
11 <field name="type">tree</field>
12 <field name="arch" type="xml">
13 <tree string="Work Orders">
14 <field name="date" invisible="1"/>
15 <field name="product_id" invisible="1"/>
16 <field name="product_qty" sum="Product Qty"/>
17 <field name="nbr" string="#Line Orders" sum="#Line Orders"/>
18 <field name="total_hours" sum="Total Hours"/>
19 <field name="total_cycles" sum="Total Cycles"/>
20 <field name="delay" invisible="1"/>
21 <field name="production_id" invisible="1"/>
22 <field name="workcenter_id" invisible="1"/>
23 <field name="state" invisible="1"/>
24 <field name="day" invisible="1" />
25 <field name="month" invisible="1" />
26 <field name="year" invisible="1" />
31 <record id="view_report_mrp_workorder_graph" model="ir.ui.view">
32 <field name="name">mrp.workorder.graph</field>
33 <field name="model">mrp.workorder</field>
34 <field name="type">graph</field>
35 <field name="arch" type="xml">
36 <graph orientation="horizontal" string="Work Orders" type="bar">
38 <field name="nbr" operator="+"/>
43 <record id="view_report_mrp_workorder_filter" model="ir.ui.view">
44 <field name="name">mrp.workorder.select</field>
45 <field name="model">mrp.workorder</field>
46 <field name="type">search</field>
47 <field name="arch" type="xml">
48 <search string="Search">
50 <filter icon="terp-go-year" string="Year"
51 domain="[('year','=',time.strftime('%%Y'))]"
52 help="Work orders made during current year"/>
53 <filter icon="terp-go-month" string="Month"
55 domain="[('month','=',time.strftime('%%m'))]"
56 help="Work orders made during current month"/>
57 <filter icon="terp-go-week"
59 domain="[('month','=',(datetime.date.today() - datetime.timedelta(365/12)).strftime('%%m'))]"
60 help="Work orders during last month"/>
61 <separator orientation="vertical"/>
62 <filter string="Current" icon="terp-check" domain="[('state','not in',('draft','cancel','done'))]"/>
63 <filter icon="terp-check" string="Started" domain="[('state','=','startworking')]"/>
64 <filter icon="terp-camera_test" string="Done" domain="[('state','=','done')]"/>
65 <separator orientation="vertical"/>
66 <field name="product_id" />
67 <field name="workcenter_id"/>
70 <group expand="1" string="Group By...">
71 <filter string="Product" name="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id'}" />
72 <filter string="Work Center" name="Workcenter" icon="terp-go-home" context="{'group_by':'workcenter_id'}" />
73 <separator orientation="vertical"/>
74 <filter string="Production" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'production_id'}"/>
75 <separator orientation="vertical"/>
76 <filter string="State" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
77 <separator orientation="vertical"/>
78 <filter string="Day" icon="terp-go-today" context="{'group_by':'day'}" help="Planned Day"/>
79 <separator orientation="vertical"/>
80 <filter string="Month" name="terp-go-month" icon="terp-go-month" context="{'group_by':'month'}" help="Planned Month"/>
81 <separator orientation="vertical"/>
82 <filter string="Year" icon="terp-go-year" context="{'group_by':'year'}" help="Planned Year"/>
87 <record id="action_report_mrp_workorder" model="ir.actions.act_window">
88 <field name="name">Work Order</field>
89 <field name="res_model">mrp.workorder</field>
90 <field name="view_type">form</field>
91 <field name="view_mode">graph,tree</field>
92 <field name="view_id" ref="view_report_mrp_workorder_tree"/>
93 <field name="search_view_id" ref="view_report_mrp_workorder_filter"/>
94 <field name="context">{'search_default_Workcenter': 1,'search_default_month':1,'group_by_no_leaf':1,'group_by':[]}</field>
97 <record model="ir.actions.act_window.view" id="action_report_mrp_workorder_tree">
98 <field name="sequence" eval="1"/>
99 <field name="view_mode">tree</field>
100 <field name="view_id" ref="view_report_mrp_workorder_tree"/>
101 <field name="act_window_id" ref="action_report_mrp_workorder"/>
104 <record model="ir.actions.act_window.view" id="action_report_mrp_workorder_graph">
105 <field name="sequence" eval="2"/>
106 <field name="view_mode">graph</field>
107 <field name="view_id" ref="view_report_mrp_workorder_graph"/>
108 <field name="act_window_id" ref="action_report_mrp_workorder"/>
111 <menuitem name="Work Order Analysis" action="action_report_mrp_workorder" id="menu_report_mrp_workorders_tree" parent="mrp.next_id_77"/>