odoo/addons/mrp_operations/report/mrp_workorder_analysis_view...

65 lines
3.6 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!--
Work Order Report
-->
<record id="view_report_mrp_workorder_graph" model="ir.ui.view">
<field name="name">mrp.workorder.graph</field>
<field name="model">mrp.workorder</field>
<field name="arch" type="xml">
<graph string="Work Orders" type="pivot">
<field name="state" type="row"/>
<field name="product_qty" type="measure"/>
<field name="nbr" type="measure"/>
<field name="total_hours" type="measure"/>
<field name="total_cycles" type="measure"/>
</graph>
</field>
</record>
<record id="view_report_mrp_workorder_filter" model="ir.ui.view">
<field name="name">mrp.workorder.select</field>
<field name="model">mrp.workorder</field>
<field name="arch" type="xml">
<search string="Search">
<field name="date"/>
<filter string="Current" icon="terp-check" domain="[('state','not in',('draft','cancel','done'))]"/>
<filter icon="terp-check" string="Started" domain="[('state','=','startworking')]"/>
<filter icon="terp-camera_test" string="Done" domain="[('state','=','done')]"/>
<field name="product_id" />
<field name="workcenter_id"/>
<group expand="1" string="Group By...">
<filter string="Product" name="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id'}" />
<filter string="Work Center" name="Workcenter" icon="terp-go-home" context="{'group_by':'workcenter_id'}" />
<filter string="Production" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'production_id'}"/>
<filter string="Status" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
<filter string="Date Planned (day)" icon="terp-go-today" context="{'group_by':'date:day'}" help="Planned Day"/>
<filter string="Date Planned (month)" name="terp-go-month" icon="terp-go-month" context="{'group_by':'date:month'}" help="Planned Month"/>
<filter string="Date Planned (year)" icon="terp-go-year" context="{'group_by':'date:year'}" help="Planned Year"/>
</group>
</search>
</field>
</record>
<record id="action_report_mrp_workorder" model="ir.actions.act_window">
<field name="name">Work Order</field>
<field name="res_model">mrp.workorder</field>
<field name="view_type">form</field>
<field name="view_mode">graph</field>
<field name="view_id" ref="view_report_mrp_workorder_graph"/>
<field name="search_view_id" ref="view_report_mrp_workorder_filter"/>
<field name="context">{'search_default_Workcenter': 1,'group_by_no_leaf':1,'group_by':[]}</field>
</record>
<record model="ir.actions.act_window.view" id="action_report_mrp_workorder_graph">
<field name="sequence" eval="2"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="view_report_mrp_workorder_graph"/>
<field name="act_window_id" ref="action_report_mrp_workorder"/>
</record>
<menuitem name="Work Order Analysis" action="action_report_mrp_workorder" id="menu_report_mrp_workorders_tree" parent="mrp.next_id_77"/>
</data>
</openerp>