odoo/addons/sale_margin/report_margin_view.xml

95 lines
4.8 KiB
XML

<?xml version="1.0"?>
<openerp>
<data>
<record model="ir.ui.view" id="view_report_account_invoice_tree">
<field name="name">report.account.invoice.product.tree</field>
<field name="model">report.account.invoice.product</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Invoices by product">
<field name="date"/>
<field name="year" invisible="1" />
<field name="month" invisible="1"/>
<field name="day" invisible="1"/>
<field name="type"/>
<field name="state"/>
<field name="product_id" invisible="1" />
<field name="partner_id"/>
<field name="categ_id" invisible="1" />
<field name="amount"/>
<field name="cost_price"/>
<field name="margin"/>
<field name="quantity"/>
</tree>
</field>
</record>
<record id="view_report_account_invoice_filter" model="ir.ui.view">
<field name="name">account.invoice.product.filter</field>
<field name="model">report.account.invoice.product</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Margin">
<group col="10" colspan="4">
<filter icon="terp-account" string="This Year" domain="[('year','=',time.strftime('%%Y'))]" help="All Months Sales by Margin"/>
<filter icon="terp-account" string="This Month" domain="[('month','=',time.strftime('%%m'))]" help="This Months Sales by Margin"/>
<filter string="Draft" icon="terp-account" domain="[('state','=','draft')]" help="Draft Invoices"/>
<filter string="Pro-forma" icon="terp-account" domain="[('state','=','proforma')]" help="Pro-forma Invoices"/>
<filter string="Current" icon="terp-account" domain="[('state', '=' ,'open')]" help="open Invoices"/>
<filter string="Done" icon="terp-account" domain="[('state','=','paid')]" help="Done Invoices"/>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="4" col="10">
<filter string="Partner" icon="terp-account" context="{'group_by':'partner_id'}"/>
<filter string="Product" icon="terp-account" context="{'group_by':'product_id'}"/>
<filter string="Category" icon="terp-account" context="{'group_by':'categ_id'}"/>
<filter string="State" icon="terp-account" context="{'group_by':'state'}"/>
<filter string="Day" icon="terp-account" context="{'group_by':'day'}"/>
<filter string="Month" icon="terp-account" context="{'group_by':'month'}"/>
<filter string="Year" icon="terp-account" context="{'group_by':'year'}"/>
</group>
<newline/>
<group expand="0" string="Extended options..." groups="base.group_extended">
<field name="date" string="Date Invoiced"/>
<separator orientation="vertical"/>
<field name="partner_id" widget="selection"/>
<field name="amount" />
<field name="state"/>
<newline/>
<separator orientation="vertical"/>
<field name="product_id"/>
<field name="categ_id"/>
</group>
</search>
</field>
</record>
<record id="view_report_account_invoice_graph" model="ir.ui.view">
<field name="name">report.account.invoice.product.graph</field>
<field name="model">report.account.invoice.product</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Invoice by Partner" type="pie">
<field name="partner_id"/>
<field name="margin"/>
<field name="amount"/>
</graph>
</field>
</record>
<record id="action_report_account_invoice_report" model="ir.actions.act_window">
<field name="name">Invoice Analysis</field>
<field name="res_model">report.account.invoice.product</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="context">{"search_default_At Date":1,'group_by_no_leaf':1,'group_by':[]}</field>
<field name="search_view_id" ref="view_report_account_invoice_filter"/>
</record>
<menuitem name="Invoice Report" id="menu_report_account_invoice_product" parent="account.menu_finance_reporting"/>
<menuitem name="Invoice" id="menu_report_account_invoice_reoirt" parent="menu_report_account_invoice_product" action="action_report_account_invoice_report"/>
</data>
</openerp>