1 <?xml version="1.0" encoding="utf-8"?>
5 Production Order Report
8 <record id="view_report_mrp_production_order_tree" model="ir.ui.view">
9 <field name="name">mrp.production.order.tree</field>
10 <field name="model">mrp.production.order</field>
11 <field name="type">tree</field>
12 <field name="arch" type="xml">
13 <tree colors="blue:state == 'draft';black:state in ('picking_except','confirmed','ready','in_production');gray:state in ('done','cancel') " string="Production">
14 <field name="date_planned"/>
15 <field name="bom_id" invisible="1"/>
16 <field name="product_id" invisible="1"/>
17 <field name="product_qty" sum='Product Qty'/>
18 <field name="nbr" string="#Line Orders" sum='#Line Orders'/>
19 <field name="state" invisible="1"/>
20 <field name="picking_id" invisible="1"/>
21 <field name="priority" invisible="1"/>
22 <field name="day" invisible="1" />
23 <field name="month" invisible="1" />
24 <field name="year" invisible="1" />
25 <field name="location_src_id" invisible="1"/>
26 <field name="location_dest_id" invisible="1"/>
27 <field name="company_id" groups="base.group_multi_company" invisible="1"/>
32 <record id="view_report_mrp_production_order_graph" model="ir.ui.view">
33 <field name="name">mrp.production.order.graph</field>
34 <field name="model">mrp.production.order</field>
35 <field name="type">graph</field>
36 <field name="arch" type="xml">
37 <graph orientation="horizontal" string="Production" type="bar">
39 <field name="nbr" operator="+"/>
44 <record id="view_report_mrp_production_order_filter" model="ir.ui.view">
45 <field name="name">mrp.production.order.select</field>
46 <field name="model">mrp.production.order</field>
47 <field name="type">search</field>
48 <field name="arch" type="xml">
49 <search string="Search">
51 <filter icon="terp-go-year" string="Year"
52 domain="[('year','=',time.strftime('%%Y'))]"
53 help="Production performed during current year"/>
54 <filter icon="terp-go-month" string="Month"
56 domain="[('date','<=',(datetime.date.today()+relativedelta(day=31)).strftime('%%Y-%%m-%%d')),('date','>=',(datetime.date.today()-relativedelta(day=1)).strftime('%%Y-%%m-%%d'))]"
57 help="Production performed during current month"/>
58 <filter icon="terp-go-week"
60 domain="[('date','<=', (datetime.date.today() - relativedelta(day=31, months=1)).strftime('%%Y-%%m-%%d')),('date','>=',(datetime.date.today() - relativedelta(day=1,months=1)).strftime('%%Y-%%m-%%d'))]"
61 help="Production during last month"/>
62 <separator orientation="vertical"/>
63 <filter icon="terp-check" string="Ready In production" domain="[('state','=','in_production')]"/>
64 <filter icon="terp-camera_test" string="Done" domain="[('state','=','done')]"/>
65 <separator orientation="vertical"/>
66 <field name="location_src_id" />
67 <field name="location_dest_id" />
70 <group expand="0" string="Extended Filters..." groups="base.group_extended">
71 <filter icon="terp-emblem-important" string="Picking Exception" domain="[('state','=','picking_except')]"/>
72 <filter icon="terp-gtk-media-pause" string="Waiting Goods" domain="[('state','=','confirmed')]"/>
73 <filter icon="terp-camera_test" string="Ready to Produce" domain="[('state','=','ready')]"/>
74 <separator orientation="vertical"/>
75 <field name="priority"/>
76 <separator orientation="vertical"/>
77 <field name="company_id" groups="base.group_multi_company"/>
79 <field name="date_start"/>
80 <field name="date_planned"/>
81 <field name="date_finished"/>
84 <group expand="1" string="Group By...">
85 <filter string="Raw Material Location" icon="terp-gtk-jump-to-rtl" context="{'group_by':'location_src_id'}"/>
86 <filter string="Finished Products Location" icon="terp-gtk-jump-to-ltr" context="{'group_by':'location_dest_id'}"/>
87 <separator orientation="vertical"/>
88 <filter string="Product" name="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id'}" />
89 <filter string="BOM" icon="terp-mrp" context="{'group_by':'bom_id'}"/>
90 <separator orientation="vertical"/>
91 <filter string="State" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
92 <separator orientation="vertical"/>
93 <filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
94 <separator orientation="vertical" groups="base.group_multi_company"/>
95 <filter string="Day" icon="terp-go-today" context="{'group_by':'day'}"/>
96 <separator orientation="vertical"/>
97 <filter string="Month" name="terp-go-month" icon="terp-go-month" context="{'group_by':'month'}"/>
98 <separator orientation="vertical"/>
99 <filter string="Year" icon="terp-go-year" context="{'group_by':'year'}"/>
104 <record id="action_report_mrp_production_order" model="ir.actions.act_window">
105 <field name="name">Production Analysis</field>
106 <field name="res_model">mrp.production.order</field>
107 <field name="view_type">form</field>
108 <field name="view_mode">tree,graph</field>
109 <field name="view_id" ref="view_report_mrp_production_order_tree"/>
110 <field name="search_view_id" ref="view_report_mrp_production_order_filter"/>
111 <field name="context">{'search_default_Product': 1,'search_default_month':1,'group_by_no_leaf':1,'group_by':[]}</field>
112 <field name="help">This reporting allows you to analyse your manufacturing activities and performance.</field>
115 <record model="ir.actions.act_window.view" id="action_report_mrp_production_order_tree">
116 <field name="sequence" eval="1"/>
117 <field name="view_mode">tree</field>
118 <field name="view_id" ref="view_report_mrp_production_order_tree"/>
119 <field name="act_window_id" ref="action_report_mrp_production_order"/>
122 <record model="ir.actions.act_window.view" id="action_report_mrp_production_order_graph">
123 <field name="sequence" eval="2"/>
124 <field name="view_mode">graph</field>
125 <field name="view_id" ref="view_report_mrp_production_order_graph"/>
126 <field name="act_window_id" ref="action_report_mrp_production_order"/>
129 <menuitem name="Production Analysis" action="action_report_mrp_production_order" id="menu_report_mrp_production_orders_tree" parent="next_id_77"/>