For the graph views based on reporting models (e.g sale.report), click on a group in the chart redirects the user to an "empty" list view. Here we use the attribute disable_linking to avoid that redirection for those views. Task ID: 2336960 closes odoo/odoo#57622 X-original-commit: 0b0ae92b6bdac25843ba24d767dbcab3b75703e5 Related: odoo/enterprise#13192 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
77 lines
4.3 KiB
XML
77 lines
4.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
|
|
<record id="view_order_product_pivot" model="ir.ui.view">
|
|
<field name="name">sale.report.pivot</field>
|
|
<field name="model">sale.report</field>
|
|
<field name="arch" type="xml">
|
|
<pivot string="Sales Analysis" disable_linking="True" sample="1">
|
|
<field name="team_id" type="col"/>
|
|
<field name="date" interval="month" type="row"/>
|
|
<field name="price_subtotal" type="measure"/>
|
|
</pivot>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_order_product_graph" model="ir.ui.view">
|
|
<field name="name">sale.report.graph</field>
|
|
<field name="model">sale.report</field>
|
|
<field name="arch" type="xml">
|
|
<graph string="Sales Analysis" type="line" sample="1" disable_linking="1">
|
|
<field name="date" type="row" interval="day"/>
|
|
<field name="price_subtotal" type="measure"/>
|
|
</graph>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_order_product_search" model="ir.ui.view">
|
|
<field name="name">sale.report.search</field>
|
|
<field name="model">sale.report</field>
|
|
<field name="arch" type="xml">
|
|
<search string="Sales Analysis">
|
|
<field name="date"/>
|
|
<filter string="Date" name="year" invisible="1" date="date" default_period="this_year"/>
|
|
<filter name="Quotations" string="Quotations" domain="[('state','in', ('draft', 'sent'))]"/>
|
|
<filter name="Sales" string="Sales Orders" domain="[('state','not in',('draft', 'cancel', 'sent'))]"/>
|
|
<separator/>
|
|
<filter name="filter_date" date="date" default_period="this_month"/>
|
|
<separator/>
|
|
<field name="user_id"/>
|
|
<field name="team_id"/>
|
|
<field name="product_id"/>
|
|
<field name="categ_id"/>
|
|
<field name="partner_id"/>
|
|
<field name="country_id"/>
|
|
<field name="industry_id"/>
|
|
<group expand="0" string="Extended Filters">
|
|
<field name="categ_id" filter_domain="[('categ_id', 'child_of', self)]"/>
|
|
<field name="company_id" groups="base.group_multi_company"/>
|
|
</group>
|
|
<group expand="1" string="Group By">
|
|
<filter string="Salesperson" name="User" context="{'group_by':'user_id'}"/>
|
|
<filter string="Sales Team" name="sales_channel" context="{'group_by':'team_id'}"/>
|
|
<filter string="Customer" name="Customer" context="{'group_by':'partner_id'}"/>
|
|
<filter string="Customer Country" name="country_id" context="{'group_by':'country_id'}"/>
|
|
<filter string="Customer Industry" name="industry_id" context="{'group_by':'industry_id'}"/>
|
|
<filter string="Product" name="Product" context="{'group_by':'product_id'}"/>
|
|
<filter string="Product Category" name="Category" context="{'group_by':'categ_id'}"/>
|
|
<filter name="status" string="Status" context="{'group_by':'state'}"/>
|
|
<filter string="Company" name="company" groups="base.group_multi_company" context="{'group_by':'company_id'}"/>
|
|
<separator/>
|
|
<filter string="Order Date" name="date" context="{'group_by':'date'}"/>
|
|
</group>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="action_order_report_all" model="ir.actions.act_window">
|
|
<field name="name">Sales Analysis</field>
|
|
<field name="res_model">sale.report</field>
|
|
<field name="view_mode">graph,pivot</field>
|
|
<field name="view_id"></field> <!-- force empty -->
|
|
<field name="search_view_id" ref="view_order_product_search"/>
|
|
<field name="context">{'search_default_Sales':1, 'group_by_no_leaf':1,'group_by':[]}</field>
|
|
<field name="help">This report performs analysis on your quotations and sales orders. Analysis check your sales revenues and sort it by different group criteria (salesman, partner, product, etc.) Use this report to perform analysis on sales not having invoiced yet. If you want to analyse your turnover, you should use the Invoice Analysis report in the Accounting application.</field>
|
|
</record>
|
|
</odoo>
|