<?xml version="1.0"?>
<!-- This file is part of Tryton.  The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tryton>
    <data>
        <menuitem
            name="Reporting"
            parent="menu_sale"
            sequence="100"
            id="menu_reporting"/>

        <menuitem
            name="Sales"
            parent="menu_reporting"
            sequence="10"
            id="menu_reporting_sale"
            icon="tryton-graph"/>

        <record model="ir.ui.view" id="reporting_context_view_form">
            <field name="model">sale.reporting.context</field>
            <field name="type">form</field>
            <field name="name">sale_reporting_context_form</field>
        </record>

        <!-- Main -->

        <record model="ir.ui.view" id="reporting_main_view_list">
            <field name="model">sale.reporting.main</field>
            <field name="type">tree</field>
            <field name="name">sale_reporting_main_list</field>
        </record>

        <record model="ir.ui.view" id="reporting_main_view_graph_revenue">
            <field name="model">sale.reporting.main</field>
            <field name="type">graph</field>
            <field name="name">sale_reporting_main_graph_revenue</field>
        </record>

        <record model="ir.ui.view" id="reporting_main_view_graph_number">
            <field name="model">sale.reporting.main</field>
            <field name="type">graph</field>
            <field name="name">sale_reporting_main_graph_number</field>
        </record>

        <record model="ir.action.act_window" id="act_reporting_main">
            <field name="name">Sales</field>
            <field name="res_model">sale.reporting.main</field>
            <field name="context_model">sale.reporting.context</field>
        </record>
        <record model="ir.action.act_window.view" id="act_reporting_main_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="reporting_main_view_list"/>
            <field name="act_window" ref="act_reporting_main"/>
        </record>
        <record model="ir.action.keyword" id="act_reporting_main_keyword1">
            <field name="keyword">tree_open</field>
            <field name="model" ref="menu_reporting_sale"/>
            <field name="action" ref="act_reporting_main"/>
        </record>

        <record model="ir.rule.group" id="rule_group_reporting_main_companies">
            <field name="name">User in companies</field>
            <field name="model">sale.reporting.main</field>
            <field name="global_p" eval="True"/>
        </record>
        <record model="ir.rule" id="rule_reporting_main_companies">
            <field name="domain"
                eval="[('company', 'in', Eval('companies', []))]"
                pyson="1"/>
            <field name="rule_group" ref="rule_group_reporting_main_companies"/>
        </record>

        <record model="ir.model.access" id="access_reporting_main">
            <field name="model">sale.reporting.main</field>
            <field name="perm_read" eval="False"/>
            <field name="perm_write" eval="False"/>
            <field name="perm_create" eval="False"/>
            <field name="perm_delete" eval="False"/>
        </record>
        <record model="ir.model.access" id="access_reporting_main_sale">
            <field name="model">sale.reporting.main</field>
            <field name="group" ref="group_sale"/>
            <field name="perm_read" eval="True"/>
            <field name="perm_write" eval="False"/>
            <field name="perm_create" eval="False"/>
            <field name="perm_delete" eval="False"/>
        </record>

        <record model="ir.ui.view" id="reporting_main_time_series_view_list">
            <field name="model">sale.reporting.main.time_series</field>
            <field name="type">tree</field>
            <field name="name">sale_reporting_main_time_series_list</field>
        </record>

        <record model="ir.ui.view" id="reporting_main_time_series_view_graph_revenue">
            <field name="model">sale.reporting.main.time_series</field>
            <field name="type">graph</field>
            <field name="name">sale_reporting_main_time_series_graph_revenue</field>
        </record>

        <record model="ir.ui.view" id="reporting_main_time_series_view_graph_number">
            <field name="model">sale.reporting.main.time_series</field>
            <field name="type">graph</field>
            <field name="name">sale_reporting_main_time_series_graph_number</field>
        </record>

        <record model="ir.action.act_window" id="act_reporting_main_time_series">
            <field name="name">Sales</field>
            <field name="res_model">sale.reporting.main.time_series</field>
            <field name="context_model">sale.reporting.context</field>
            <field name="order" eval="[('date', 'DESC')]" pyson="1"/>
        </record>
        <record model="ir.action.act_window.view" id="act_reporting_main_time_series_list_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="reporting_main_time_series_view_list"/>
            <field name="act_window" ref="act_reporting_main_time_series"/>
        </record>
        <record model="ir.action.act_window.view" id="act_reporting_main_time_series_list_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="reporting_main_time_series_view_graph_revenue"/>
            <field name="act_window" ref="act_reporting_main_time_series"/>
        </record>
        <record model="ir.action.act_window.view" id="act_reporting_main_time_series_list_view3">
            <field name="sequence" eval="30"/>
            <field name="view" ref="reporting_main_time_series_view_graph_number"/>
            <field name="act_window" ref="act_reporting_main_time_series"/>
        </record>
        <record model="ir.action.keyword" id="act_reporting_main_time_series_list_keyword1">
            <field name="keyword">tree_open</field>
            <field name="model">sale.reporting.main,-1</field>
            <field name="action" ref="act_reporting_main_time_series"/>
        </record>

        <record model="ir.rule.group" id="rule_group_reporting_main_time_series_companies">
            <field name="name">User in companies</field>
            <field name="model">sale.reporting.main.time_series</field>
            <field name="global_p" eval="True"/>
        </record>
        <record model="ir.rule" id="rule_reporting_main_time_series_companies">
            <field name="domain"
                eval="[('company', 'in', Eval('companies', []))]"
                pyson="1"/>
            <field name="rule_group" ref="rule_group_reporting_main_time_series_companies"/>
        </record>

        <record model="ir.model.access" id="access_reporting_main_time_series">
            <field name="model">sale.reporting.main.time_series</field>
            <field name="perm_read" eval="False"/>
            <field name="perm_write" eval="False"/>
            <field name="perm_create" eval="False"/>
            <field name="perm_delete" eval="False"/>
        </record>
        <record model="ir.model.access" id="access_reporting_main_time_series_sale">
            <field name="model">sale.reporting.main.time_series</field>
            <field name="group" ref="group_sale"/>
            <field name="perm_read" eval="True"/>
            <field name="perm_write" eval="False"/>
            <field name="perm_create" eval="False"/>
            <field name="perm_delete" eval="False"/>
        </record>

        <!-- Customer -->

        <record model="ir.ui.view" id="reporting_customer_view_list">
            <field name="model">sale.reporting.customer</field>
            <field name="type" eval="None"/>
            <field name="inherit" ref="reporting_main_view_list"/>
            <field name="name">sale_reporting_customer_list</field>
        </record>

        <record model="ir.ui.view" id="reporting_customer_view_graph_revenue">
            <field name="model">sale.reporting.customer</field>
            <field name="type" eval="None"/>
            <field name="inherit" ref="reporting_main_view_graph_revenue"/>
            <field name="name">sale_reporting_customer_graph_revenue</field>
        </record>

        <record model="ir.ui.view" id="reporting_customer_view_graph_number">
            <field name="model">sale.reporting.customer</field>
            <field name="type" eval="None"/>
            <field name="inherit" ref="reporting_main_view_graph_number"/>
            <field name="name">sale_reporting_customer_graph_number</field>
        </record>

        <record model="ir.action.act_window" id="act_reporting_customer">
            <field name="name">Sales per Customer</field>
            <field name="res_model">sale.reporting.customer</field>
            <field name="context_model">sale.reporting.context</field>
            <field
                name="domain"
                eval="If(Eval('active_model') == 'sale.reporting.customer.category.tree', [('customer', 'where', [('categories', 'child_of', Eval('active_ids', []), 'parent')])], [])"
                pyson="1"/>
        </record>
        <record model="ir.action.act_window.view" id="act_reporting_customer_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="reporting_customer_view_list"/>
            <field name="act_window" ref="act_reporting_customer"/>
        </record>
        <record model="ir.action.act_window.view" id="act_reporting_customer_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="reporting_customer_view_graph_revenue"/>
            <field name="act_window" ref="act_reporting_customer"/>
        </record>
        <record model="ir.action.act_window.view" id="act_reporting_customer_view3">
            <field name="sequence" eval="30"/>
            <field name="view" ref="reporting_customer_view_graph_number"/>
            <field name="act_window" ref="act_reporting_customer"/>
        </record>
        <record model="ir.action.keyword" id="act_reporting_customer_keyword1">
            <field name="keyword">tree_open</field>
            <field name="model" ref="menu_reporting_sale"/>
            <field name="action" ref="act_reporting_customer"/>
        </record>
        <record model="ir.action.keyword" id="act_reporting_customer_keyword2">
            <field name="keyword">tree_open</field>
            <field name="model">sale.reporting.customer.category.tree,-1</field>
            <field name="action" ref="act_reporting_customer"/>
        </record>

        <record model="ir.rule.group" id="rule_group_reporting_customer_companies">
            <field name="name">User in companies</field>
            <field name="model">sale.reporting.customer</field>
            <field name="global_p" eval="True"/>
        </record>
        <record model="ir.rule" id="rule_reporting_customer_companies">
            <field name="domain"
                eval="[('company', 'in', Eval('companies', []))]"
                pyson="1"/>
            <field name="rule_group" ref="rule_group_reporting_customer_companies"/>
        </record>

        <record model="ir.model.access" id="access_reporting_customer">
            <field name="model">sale.reporting.customer</field>
            <field name="perm_read" eval="False"/>
            <field name="perm_write" eval="False"/>
            <field name="perm_create" eval="False"/>
            <field name="perm_delete" eval="False"/>
        </record>
        <record model="ir.model.access" id="access_reporting_customer_sale">
            <field name="model">sale.reporting.customer</field>
            <field name="group" ref="group_sale"/>
            <field name="perm_read" eval="True"/>
            <field name="perm_write" eval="False"/>
            <field name="perm_create" eval="False"/>
            <field name="perm_delete" eval="False"/>
        </record>

        <record model="ir.ui.view" id="reporting_customer_time_series_view_list">
            <field name="model">sale.reporting.customer.time_series</field>
            <field name="type">tree</field>
            <field name="name">sale_reporting_main_time_series_list</field>
        </record>

        <record model="ir.ui.view" id="reporting_customer_time_series_view_graph_revenue">
            <field name="model">sale.reporting.customer.time_series</field>
            <field name="type">graph</field>
            <field name="name">sale_reporting_main_time_series_graph_revenue</field>
        </record>

        <record model="ir.ui.view" id="reporting_customer_time_series_view_graph_number">
            <field name="model">sale.reporting.customer.time_series</field>
            <field name="type">graph</field>
            <field name="name">sale_reporting_main_time_series_graph_number</field>
        </record>

        <record model="ir.action.act_window" id="act_reporting_customer_time_series">
            <field name="name">Sales per Customer</field>
            <field name="res_model">sale.reporting.customer.time_series</field>
            <field name="context_model">sale.reporting.context</field>
            <field
                name="domain"
                eval="[('customer', '=', Eval('active_id', -1))]"
                pyson="1"/>
            <field name="order" eval="[('date', 'DESC')]" pyson="1"/>
        </record>
        <record model="ir.action.act_window.view" id="act_reporting_customer_time_series_list_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="reporting_customer_time_series_view_list"/>
            <field name="act_window" ref="act_reporting_customer_time_series"/>
        </record>
        <record model="ir.action.act_window.view" id="act_reporting_customer_time_series_list_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="reporting_customer_time_series_view_graph_revenue"/>
            <field name="act_window" ref="act_reporting_customer_time_series"/>
        </record>
        <record model="ir.action.act_window.view" id="act_reporting_customer_time_series_list_view3">
            <field name="sequence" eval="30"/>
            <field name="view" ref="reporting_customer_time_series_view_graph_number"/>
            <field name="act_window" ref="act_reporting_customer_time_series"/>
        </record>
        <record model="ir.action.keyword" id="act_reporting_customer_time_series_list_keyword1">
            <field name="keyword">tree_open</field>
            <field name="model">sale.reporting.customer,-1</field>
            <field name="action" ref="act_reporting_customer_time_series"/>
        </record>

        <record model="ir.rule.group" id="rule_group_reporting_customer_time_series_companies">
            <field name="name">User in companies</field>
            <field name="model">sale.reporting.customer.time_series</field>
            <field name="global_p" eval="True"/>
        </record>
        <record model="ir.rule" id="rule_reporting_customer_time_series_companies">
            <field name="domain"
                eval="[('company', 'in', Eval('companies', []))]"
                pyson="1"/>
            <field name="rule_group" ref="rule_group_reporting_customer_time_series_companies"/>
        </record>

        <record model="ir.model.access" id="access_reporting_customer_time_series">
            <field name="model">sale.reporting.customer.time_series</field>
            <field name="perm_read" eval="False"/>
            <field name="perm_write" eval="False"/>
            <field name="perm_create" eval="False"/>
            <field name="perm_delete" eval="False"/>
        </record>
        <record model="ir.model.access" id="access_reporting_customer_time_series_sale">
            <field name="model">sale.reporting.customer.time_series</field>
            <field name="group" ref="group_sale"/>
            <field name="perm_read" eval="True"/>
            <field name="perm_write" eval="False"/>
            <field name="perm_create" eval="False"/>
            <field name="perm_delete" eval="False"/>
        </record>

        <!-- Customer Category -->

        <record model="ir.ui.view" id="reporting_customer_category_view_tree">
            <field name="model">sale.reporting.customer.category.tree</field>
            <field name="type">tree</field>
            <field name="field_childs">children</field>
            <field name="name">sale_reporting_customer_category_tree</field>
        </record>

        <record model="ir.action.act_window" id="act_reporting_customer_category_tree">
            <field name="name">Sales per Customer Category</field>
            <field name="res_model">sale.reporting.customer.category.tree</field>
            <field name="context_model">sale.reporting.context</field>
            <field name="domain" eval="[('parent', '=', None)]" pyson="1"/>
        </record>
        <record model="ir.action.act_window.view" id="act_reporting_customer_category_tree_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="reporting_customer_category_view_tree"/>
            <field name="act_window" ref="act_reporting_customer_category_tree"/>
        </record>
        <record model="ir.action.keyword" id="act_reporting_customer_category_tree_keyword1">
            <field name="keyword">tree_open</field>
            <field name="model" ref="menu_reporting_sale"/>
            <field name="action" ref="act_reporting_customer_category_tree"/>
        </record>

        <record model="ir.ui.view" id="reporting_customer_category_view_list">
            <field name="model">sale.reporting.customer.category</field>
            <field name="type" eval="None"/>
            <field name="inherit" ref="reporting_main_view_list"/>
            <field name="name">sale_reporting_customer_category_list</field>
        </record>

        <record model="ir.action.act_window" id="act_reporting_customer_category">
            <field name="name">Sales per Customer Category</field>
            <field name="res_model">sale.reporting.customer.category</field>
            <field name="context_model">sale.reporting.context</field>
            <field
                name="domain"
                eval="[('category', 'child_of', Eval('active_ids', []), 'parent')]"
                pyson="1"/>
        </record>
        <record model="ir.action.act_window.view" id="act_reporting_customer_category_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="reporting_customer_category_view_list"/>
            <field name="act_window" ref="act_reporting_customer_category"/>
        </record>
        <record model="ir.action.keyword" id="act_reporting_customer_category_keyword1">
            <field name="keyword">tree_open</field>
            <field name="model">sale.reporting.customer.category.tree,-1</field>
            <field name="action" ref="act_reporting_customer_category"/>
        </record>

        <record model="ir.rule.group" id="rule_group_reporting_customer_category_companies">
            <field name="name">User in companies</field>
            <field name="model">sale.reporting.customer.category</field>
            <field name="global_p" eval="True"/>
        </record>
        <record model="ir.rule" id="rule_reporting_customer_category_companies">
            <field name="domain"
                eval="[('company', 'in', Eval('companies', []))]"
                pyson="1"/>
            <field name="rule_group" ref="rule_group_reporting_customer_category_companies"/>
        </record>

        <record model="ir.model.access" id="access_reporting_customer_category">
            <field name="model">sale.reporting.customer.category</field>
            <field name="perm_read" eval="False"/>
            <field name="perm_write" eval="False"/>
            <field name="perm_create" eval="False"/>
            <field name="perm_delete" eval="False"/>
        </record>
        <record model="ir.model.access" id="access_reporting_customer_category_sale">
            <field name="model">sale.reporting.customer.category</field>
            <field name="group" ref="group_sale"/>
            <field name="perm_read" eval="True"/>
            <field name="perm_write" eval="False"/>
            <field name="perm_create" eval="False"/>
            <field name="perm_delete" eval="False"/>
        </record>

        <record model="ir.ui.view" id="reporting_customer_category_time_series_view_list">
            <field name="model">sale.reporting.customer.category.time_series</field>
            <field name="type">tree</field>
            <field name="name">sale_reporting_main_time_series_list</field>
        </record>

        <record model="ir.ui.view" id="reporting_customer_category_time_series_view_graph_revenue">
            <field name="model">sale.reporting.customer.category.time_series</field>
            <field name="type">graph</field>
            <field name="name">sale_reporting_main_time_series_graph_revenue</field>
        </record>

        <record model="ir.ui.view" id="reporting_customer_category_time_series_view_graph_number">
            <field name="model">sale.reporting.customer.category.time_series</field>
            <field name="type">graph</field>
            <field name="name">sale_reporting_main_time_series_graph_number</field>
        </record>

        <record model="ir.action.act_window" id="act_reporting_customer_category_time_series">
            <field name="name">Sales per Party Category</field>
            <field name="res_model">sale.reporting.customer.category.time_series</field>
            <field name="context_model">sale.reporting.context</field>
            <field
                name="domain"
                eval="[('category', '=', Eval('active_id', -1))]"
                pyson="1"/>
            <field name="order" eval="[('date', 'DESC')]" pyson="1"/>
        </record>
        <record model="ir.action.act_window.view" id="act_reporting_customer_category_time_series_list_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="reporting_customer_category_time_series_view_list"/>
            <field name="act_window" ref="act_reporting_customer_category_time_series"/>
        </record>
        <record model="ir.action.act_window.view" id="act_reporting_customer_category_time_series_list_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="reporting_customer_category_time_series_view_graph_revenue"/>
            <field name="act_window" ref="act_reporting_customer_category_time_series"/>
        </record>
        <record model="ir.action.act_window.view" id="act_reporting_customer_category_time_series_list_view3">
            <field name="sequence" eval="30"/>
            <field name="view" ref="reporting_customer_category_time_series_view_graph_number"/>
            <field name="act_window" ref="act_reporting_customer_category_time_series"/>
        </record>
        <record model="ir.action.keyword" id="act_reporting_customer_category_time_series_list_keyword1">
            <field name="keyword">tree_open</field>
            <field name="model">sale.reporting.customer.category,-1</field>
            <field name="action" ref="act_reporting_customer_category_time_series"/>
        </record>

        <record model="ir.rule.group" id="rule_group_reporting_customer_category_time_series_companies">
            <field name="name">User in companies</field>
            <field name="model">sale.reporting.customer.category.time_series</field>
            <field name="global_p" eval="True"/>
        </record>
        <record model="ir.rule" id="rule_reporting_customer_category_time_series_companies">
            <field name="domain"
                eval="[('company', 'in', Eval('companies', []))]"
                pyson="1"/>
            <field name="rule_group" ref="rule_group_reporting_customer_category_time_series_companies"/>
        </record>

        <record model="ir.model.access" id="access_reporting_customer_category_time_series">
            <field name="model">sale.reporting.customer.category.time_series</field>
            <field name="perm_read" eval="False"/>
            <field name="perm_write" eval="False"/>
            <field name="perm_create" eval="False"/>
            <field name="perm_delete" eval="False"/>
        </record>
        <record model="ir.model.access" id="access_reporting_customer_category_time_series_sale">
            <field name="model">sale.reporting.customer.category.time_series</field>
            <field name="group" ref="group_sale"/>
            <field name="perm_read" eval="True"/>
            <field name="perm_write" eval="False"/>
            <field name="perm_create" eval="False"/>
            <field name="perm_delete" eval="False"/>
        </record>

        <!-- Product -->

        <record model="ir.ui.view" id="reporting_product_view_list">
            <field name="model">sale.reporting.product</field>
            <field name="type" eval="None"/>
            <field name="inherit" ref="reporting_main_view_list"/>
            <field name="name">sale_reporting_product_list</field>
        </record>

        <record model="ir.ui.view" id="reporting_product_view_graph_revenue">
            <field name="model">sale.reporting.product</field>
            <field name="type" eval="None"/>
            <field name="inherit" ref="reporting_main_view_graph_revenue"/>
            <field name="name">sale_reporting_product_graph_revenue</field>
        </record>

        <record model="ir.ui.view" id="reporting_product_view_graph_number">
            <field name="model">sale.reporting.product</field>
            <field name="type" eval="None"/>
            <field name="inherit" ref="reporting_main_view_graph_number"/>
            <field name="name">sale_reporting_product_graph_number</field>
        </record>

        <record model="ir.action.act_window" id="act_reporting_product">
            <field name="name">Sales per Product</field>
            <field name="res_model">sale.reporting.product</field>
            <field name="context_model">sale.reporting.context</field>
            <field
                name="domain"
                eval="If(Eval('active_model') == 'sale.reporting.product.category.tree', [('product', 'where', [('categories_all', 'child_of', Eval('active_ids', []), 'parent')])], [])"
                pyson="1"/>
        </record>
        <record model="ir.action.act_window.view" id="act_reporting_product_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="reporting_product_view_list"/>
            <field name="act_window" ref="act_reporting_product"/>
        </record>
        <record model="ir.action.act_window.view" id="act_reporting_product_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="reporting_product_view_graph_revenue"/>
            <field name="act_window" ref="act_reporting_product"/>
        </record>
        <record model="ir.action.act_window.view" id="act_reporting_product_view3">
            <field name="sequence" eval="30"/>
            <field name="view" ref="reporting_product_view_graph_number"/>
            <field name="act_window" ref="act_reporting_product"/>
        </record>
        <record model="ir.action.keyword" id="act_reporting_product_keyword1">
            <field name="keyword">tree_open</field>
            <field name="model" ref="menu_reporting_sale"/>
            <field name="action" ref="act_reporting_product"/>
        </record>
        <record model="ir.action.keyword" id="act_reporting_product_keyword2">
            <field name="keyword">tree_open</field>
            <field name="model">sale.reporting.product.category.tree,-1</field>
            <field name="action" ref="act_reporting_product"/>
        </record>

        <record model="ir.rule.group" id="rule_group_reporting_product_companies">
            <field name="name">User in companies</field>
            <field name="model">sale.reporting.product</field>
            <field name="global_p" eval="True"/>
        </record>
        <record model="ir.rule" id="rule_reporting_product_companies">
            <field name="domain"
                eval="[('company', 'in', Eval('companies', []))]"
                pyson="1"/>
            <field name="rule_group" ref="rule_group_reporting_product_companies"/>
        </record>

        <record model="ir.model.access" id="access_reporting_product">
            <field name="model">sale.reporting.product</field>
            <field name="perm_read" eval="False"/>
            <field name="perm_write" eval="False"/>
            <field name="perm_create" eval="False"/>
            <field name="perm_delete" eval="False"/>
        </record>
        <record model="ir.model.access" id="access_reporting_product_sale">
            <field name="model">sale.reporting.product</field>
            <field name="group" ref="group_sale"/>
            <field name="perm_read" eval="True"/>
            <field name="perm_write" eval="False"/>
            <field name="perm_create" eval="False"/>
            <field name="perm_delete" eval="False"/>
        </record>

        <record model="ir.ui.view" id="reporting_product_time_series_view_list">
            <field name="model">sale.reporting.product.time_series</field>
            <field name="type">tree</field>
            <field name="name">sale_reporting_main_time_series_list</field>
        </record>

        <record model="ir.ui.view" id="reporting_product_time_series_view_graph_revenue">
            <field name="model">sale.reporting.product.time_series</field>
            <field name="type">graph</field>
            <field name="name">sale_reporting_main_time_series_graph_revenue</field>
        </record>

        <record model="ir.ui.view" id="reporting_product_time_series_view_graph_number">
            <field name="model">sale.reporting.product.time_series</field>
            <field name="type">graph</field>
            <field name="name">sale_reporting_main_time_series_graph_number</field>
        </record>

        <record model="ir.action.act_window" id="act_reporting_product_time_series">
            <field name="name">Sales per Product</field>
            <field name="res_model">sale.reporting.product.time_series</field>
            <field name="context_model">sale.reporting.context</field>
            <field name="domain"
                eval="[('product', '=', Eval('active_id', -1))]"
                pyson="1"/>
            <field name="order" eval="[('date', 'DESC')]" pyson="1"/>
        </record>
        <record model="ir.action.act_window.view" id="act_reporting_product_time_series_list_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="reporting_product_time_series_view_list"/>
            <field name="act_window" ref="act_reporting_product_time_series"/>
        </record>
        <record model="ir.action.act_window.view" id="act_reporting_product_time_series_list_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="reporting_product_time_series_view_graph_revenue"/>
            <field name="act_window" ref="act_reporting_product_time_series"/>
        </record>
        <record model="ir.action.act_window.view" id="act_reporting_product_time_series_list_view3">
            <field name="sequence" eval="30"/>
            <field name="view" ref="reporting_product_time_series_view_graph_number"/>
            <field name="act_window" ref="act_reporting_product_time_series"/>
        </record>
        <record model="ir.action.keyword" id="act_reporting_product_time_series_list_keyword1">
            <field name="keyword">tree_open</field>
            <field name="model">sale.reporting.product,-1</field>
            <field name="action" ref="act_reporting_product_time_series"/>
        </record>

        <record model="ir.rule.group" id="rule_group_reporting_product_time_series_companies">
            <field name="name">User in companies</field>
            <field name="model">sale.reporting.product.time_series</field>
            <field name="global_p" eval="True"/>
        </record>
        <record model="ir.rule" id="rule_reporting_product_time_series_companies">
            <field name="domain"
                eval="[('company', 'in', Eval('companies', []))]"
                pyson="1"/>
            <field name="rule_group" ref="rule_group_reporting_product_time_series_companies"/>
        </record>

        <record model="ir.model.access" id="access_reporting_product_time_series">
            <field name="model">sale.reporting.product.time_series</field>
            <field name="perm_read" eval="False"/>
            <field name="perm_write" eval="False"/>
            <field name="perm_create" eval="False"/>
            <field name="perm_delete" eval="False"/>
        </record>
        <record model="ir.model.access" id="access_reporting_product_time_series_sale">
            <field name="model">sale.reporting.product.time_series</field>
            <field name="group" ref="group_sale"/>
            <field name="perm_read" eval="True"/>
            <field name="perm_write" eval="False"/>
            <field name="perm_create" eval="False"/>
            <field name="perm_delete" eval="False"/>
        </record>

        <!-- Product Category -->

        <record model="ir.ui.view" id="reporting_product_category_view_tree">
            <field name="model">sale.reporting.product.category.tree</field>
            <field name="type">tree</field>
            <field name="field_childs">children</field>
            <field name="name">sale_reporting_product_category_tree</field>
        </record>

        <record model="ir.action.act_window" id="act_reporting_product_category_tree">
            <field name="name">Sales per Product Category</field>
            <field name="res_model">sale.reporting.product.category.tree</field>
            <field name="context_model">sale.reporting.context</field>
            <field name="domain" eval="[('parent', '=', None)]" pyson="1"/>
        </record>
        <record model="ir.action.act_window.view" id="act_reporting_product_category_tree_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="reporting_product_category_view_tree"/>
            <field name="act_window" ref="act_reporting_product_category_tree"/>
        </record>
        <record model="ir.action.keyword" id="act_reporting_product_category_tree_keyword1">
            <field name="keyword">tree_open</field>
            <field name="model" ref="menu_reporting_sale"/>
            <field name="action" ref="act_reporting_product_category_tree"/>
        </record>

        <record model="ir.ui.view" id="reporting_product_category_view_list">
            <field name="model">sale.reporting.product.category</field>
            <field name="type" eval="None"/>
            <field name="inherit" ref="reporting_main_view_list"/>
            <field name="name">sale_reporting_product_category_list</field>
        </record>

        <record model="ir.action.act_window" id="act_reporting_product_category">
            <field name="name">Sales per Product Category</field>
            <field name="res_model">sale.reporting.product.category</field>
            <field name="context_model">sale.reporting.context</field>
            <field
                name="domain"
                eval="[('category', 'child_of', Eval('active_ids', []), 'parent')]"
                pyson="1"/>
        </record>
        <record model="ir.action.act_window.view" id="act_reporting_product_category_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="reporting_product_category_view_list"/>
            <field name="act_window" ref="act_reporting_product_category"/>
        </record>
        <record model="ir.action.keyword" id="act_reporting_product_category_keyword1">
            <field name="keyword">tree_open</field>
            <field name="model">sale.reporting.product.category.tree,-1</field>
            <field name="action" ref="act_reporting_product_category"/>
        </record>

        <record model="ir.rule.group" id="rule_group_reporting_product_category_companies">
            <field name="name">User in companies</field>
            <field name="model">sale.reporting.product.category</field>
            <field name="global_p" eval="True"/>
        </record>
        <record model="ir.rule" id="rule_reporting_product_category_companies">
            <field name="domain"
                eval="[('company', 'in', Eval('companies', []))]"
                pyson="1"/>
            <field name="rule_group" ref="rule_group_reporting_product_category_companies"/>
        </record>

        <record model="ir.model.access" id="access_reporting_product_category">
            <field name="model">sale.reporting.product.category</field>
            <field name="perm_read" eval="False"/>
            <field name="perm_write" eval="False"/>
            <field name="perm_create" eval="False"/>
            <field name="perm_delete" eval="False"/>
        </record>
        <record model="ir.model.access" id="access_reporting_product_category_sale">
            <field name="model">sale.reporting.product.category</field>
            <field name="group" ref="group_sale"/>
            <field name="perm_read" eval="True"/>
            <field name="perm_write" eval="False"/>
            <field name="perm_create" eval="False"/>
            <field name="perm_delete" eval="False"/>
        </record>

        <record model="ir.ui.view" id="reporting_product_category_time_series_view_list">
            <field name="model">sale.reporting.product.category.time_series</field>
            <field name="type">tree</field>
            <field name="name">sale_reporting_main_time_series_list</field>
        </record>

        <record model="ir.ui.view" id="reporting_product_category_time_series_view_graph_revenue">
            <field name="model">sale.reporting.product.category.time_series</field>
            <field name="type">graph</field>
            <field name="name">sale_reporting_main_time_series_graph_revenue</field>
        </record>

        <record model="ir.ui.view" id="reporting_product_category_time_series_view_graph_number">
            <field name="model">sale.reporting.product.category.time_series</field>
            <field name="type">graph</field>
            <field name="name">sale_reporting_main_time_series_graph_number</field>
        </record>

        <record model="ir.action.act_window" id="act_reporting_product_category_time_series">
            <field name="name">Sales per Product Category</field>
            <field name="res_model">sale.reporting.product.category.time_series</field>
            <field name="context_model">sale.reporting.context</field>
            <field
                name="domain"
                eval="[('category', '=', Eval('active_id', -1))]"
                pyson="1"/>
            <field name="order" eval="[('date', 'DESC')]" pyson="1"/>
        </record>
        <record model="ir.action.act_window.view" id="act_reporting_product_category_time_series_list_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="reporting_product_category_time_series_view_list"/>
            <field name="act_window" ref="act_reporting_product_category_time_series"/>
        </record>
        <record model="ir.action.act_window.view" id="act_reporting_product_category_time_series_list_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="reporting_product_category_time_series_view_graph_revenue"/>
            <field name="act_window" ref="act_reporting_product_category_time_series"/>
        </record>
        <record model="ir.action.act_window.view" id="act_reporting_product_category_time_series_list_view3">
            <field name="sequence" eval="30"/>
            <field name="view" ref="reporting_product_category_time_series_view_graph_number"/>
            <field name="act_window" ref="act_reporting_product_category_time_series"/>
        </record>
        <record model="ir.action.keyword" id="act_reporting_product_category_time_series_list_keyword1">
            <field name="keyword">tree_open</field>
            <field name="model">sale.reporting.product.category,-1</field>
            <field name="action" ref="act_reporting_product_category_time_series"/>
        </record>

        <record model="ir.rule.group" id="rule_group_reporting_product_category_time_series_companies">
            <field name="name">User in companies</field>
            <field name="model">sale.reporting.product.category.time_series</field>
            <field name="global_p" eval="True"/>
        </record>
        <record model="ir.rule" id="rule_reporting_product_category_time_series_companies">
            <field name="domain"
                eval="[('company', 'in', Eval('companies', []))]"
                pyson="1"/>
            <field name="rule_group" ref="rule_group_reporting_product_category_time_series_companies"/>
        </record>

        <record model="ir.model.access" id="access_reporting_product_category_time_series">
            <field name="model">sale.reporting.product.category.time_series</field>
            <field name="perm_read" eval="False"/>
            <field name="perm_write" eval="False"/>
            <field name="perm_create" eval="False"/>
            <field name="perm_delete" eval="False"/>
        </record>
        <record model="ir.model.access" id="access_reporting_product_category_time_series_sale">
            <field name="model">sale.reporting.product.category.time_series</field>
            <field name="group" ref="group_sale"/>
            <field name="perm_read" eval="True"/>
            <field name="perm_write" eval="False"/>
            <field name="perm_create" eval="False"/>
            <field name="perm_delete" eval="False"/>
        </record>

        <!-- Region -->

        <record model="ir.ui.view" id="reporting_region_tree_view_tree">
            <field name="model">sale.reporting.region.tree</field>
            <field name="type">tree</field>
            <field name="field_childs">subregions</field>
            <field name="name">sale_reporting_region_tree</field>
        </record>

        <record model="ir.action.act_window" id="act_reporting_region_tree">
            <field name="name">Sales per Region</field>
            <field name="res_model">sale.reporting.region.tree</field>
            <field name="context_model">sale.reporting.context</field>
            <field name="domain" eval="[('parent', '=', None)]" pyson="1"/>
        </record>
        <record model="ir.action.act_window.view" id="act_reporting_region_tree_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="reporting_region_tree_view_tree"/>
            <field name="act_window" ref="act_reporting_region_tree"/>
        </record>
        <record model="ir.action.keyword" id="act_reporting_region_tree_keyword1">
            <field name="keyword">tree_open</field>
            <field name="model" ref="menu_reporting_sale"/>
            <field name="action" ref="act_reporting_region_tree"/>
        </record>

        <record model="ir.action.wizard" id="wizard_reporting_region_tree_open">
            <field name="name">Open Region</field>
            <field name="wiz_name">sale.reporting.region.tree.open</field>
            <field name="model">sale.reporting.region.tree</field>
        </record>
        <record model="ir.action.keyword" id="wizard_reporting_region_tree_open_keyword1">
            <field name="keyword">tree_open</field>
            <field name="model">sale.reporting.region.tree,-1</field>
            <field name="action" ref="wizard_reporting_region_tree_open"/>
        </record>

        <record model="ir.ui.view" id="reporting_country_tree_view_tree">
            <field name="model">sale.reporting.country.tree</field>
            <field name="type">tree</field>
            <field name="name">sale_reporting_country_tree</field>
            <field name="field_childs">children</field>
        </record>

        <record model="ir.action.act_window" id="act_reporting_country_tree">
            <field name="name">Sales per Country</field>
            <field name="res_model">sale.reporting.country.tree</field>
            <field name="context_model">sale.reporting.context</field>
            <field name="domain" eval="[('parent', '=', None), ('id', 'in', Eval('active_ids', []))]" pyson="1"/>
        </record>
        <record model="ir.action.act_window.view" id="act_reporting_country_tree_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="reporting_country_tree_view_tree"/>
            <field name="act_window" ref="act_reporting_country_tree"/>
        </record>

        <record model="ir.rule.group" id="rule_group_reporting_country_tree_companies">
            <field name="name">User in companies</field>
            <field name="model">sale.reporting.country.tree</field>
            <field name="global_p" eval="True"/>
        </record>
        <record model="ir.rule" id="rule_reporting_country_tree_companies">
            <field name="domain"
                eval="[('company', 'in', Eval('companies', []))]"
                pyson="1"/>
            <field name="rule_group" ref="rule_group_reporting_country_tree_companies"/>
        </record>

        <record model="ir.model.access" id="access_reporting_country_tree">
            <field name="model">sale.reporting.country.tree</field>
            <field name="perm_read" eval="False"/>
            <field name="perm_write" eval="False"/>
            <field name="perm_create" eval="False"/>
            <field name="perm_delete" eval="False"/>
        </record>
        <record model="ir.model.access" id="access_reporting_country_tree_sale">
            <field name="model">sale.reporting.country.tree</field>
            <field name="group" ref="group_sale"/>
            <field name="perm_read" eval="True"/>
            <field name="perm_write" eval="False"/>
            <field name="perm_create" eval="False"/>
            <field name="perm_delete" eval="False"/>
        </record>

        <record model="ir.ui.view" id="reporting_country_time_series_view_list">
            <field name="model">sale.reporting.country.time_series</field>
            <field name="type">tree</field>
            <field name="name">sale_reporting_main_time_series_list</field>
        </record>

        <record model="ir.ui.view" id="reporting_country_time_series_view_graph_revenue">
            <field name="model">sale.reporting.country.time_series</field>
            <field name="type">graph</field>
            <field name="name">sale_reporting_main_time_series_graph_revenue</field>
        </record>

        <record model="ir.ui.view" id="reporting_country_time_series_view_graph_number">
            <field name="model">sale.reporting.country.time_series</field>
            <field name="type">graph</field>
            <field name="name">sale_reporting_main_time_series_graph_number</field>
        </record>

        <record model="ir.action.act_window" id="act_reporting_country_time_series">
            <field name="name">Sales per Country</field>
            <field name="res_model">sale.reporting.country.time_series</field>
            <field name="context_model">sale.reporting.context</field>
            <field name="domain"
                eval="[('country', '=', Eval('active_id', -1))]"
                pyson="1"/>
            <field name="order" eval="[('date', 'DESC')]" pyson="1"/>
        </record>
        <record model="ir.action.act_window.view" id="act_reporting_country_time_series_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="reporting_country_time_series_view_list"/>
            <field name="act_window" ref="act_reporting_country_time_series"/>
        </record>
        <record model="ir.action.act_window.view" id="act_reporting_country_time_series_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="reporting_country_time_series_view_graph_revenue"/>
            <field name="act_window" ref="act_reporting_country_time_series"/>
        </record>
        <record model="ir.action.act_window.view" id="act_reporting_country_time_series_view3">
            <field name="sequence" eval="30"/>
            <field name="view" ref="reporting_country_time_series_view_graph_number"/>
            <field name="act_window" ref="act_reporting_country_time_series"/>
        </record>

        <record model="ir.rule.group" id="rule_group_reporting_country_time_series_companies">
            <field name="name">User in companies</field>
            <field name="model">sale.reporting.country.time_series</field>
            <field name="global_p" eval="True"/>
        </record>
        <record model="ir.rule" id="rule_reporting_country_time_series_companies">
            <field name="domain"
                eval="[('company', 'in', Eval('companies', []))]"
                pyson="1"/>
            <field name="rule_group" ref="rule_group_reporting_country_time_series_companies"/>
        </record>

        <record model="ir.model.access" id="access_reporting_country_time_series">
            <field name="model">sale.reporting.country.time_series</field>
            <field name="perm_read" eval="False"/>
            <field name="perm_write" eval="False"/>
            <field name="perm_create" eval="False"/>
            <field name="perm_delete" eval="False"/>
        </record>
        <record model="ir.model.access" id="access_reporting_country_time_series_sale">
            <field name="model">sale.reporting.country.time_series</field>
            <field name="group" ref="group_sale"/>
            <field name="perm_read" eval="True"/>
            <field name="perm_write" eval="False"/>
            <field name="perm_create" eval="False"/>
            <field name="perm_delete" eval="False"/>
        </record>

        <record model="ir.ui.view" id="reporting_country_subdivision_time_series_view_list">
            <field name="model">sale.reporting.country.subdivision.time_series</field>
            <field name="type">tree</field>
            <field name="name">sale_reporting_main_time_series_list</field>
        </record>

        <record model="ir.ui.view" id="reporting_country_subdivision_time_series_view_graph_revenue">
            <field name="model">sale.reporting.country.subdivision.time_series</field>
            <field name="type">graph</field>
            <field name="name">sale_reporting_main_time_series_graph_revenue</field>
        </record>

        <record model="ir.ui.view" id="reporting_country_subdivision_time_series_view_graph_number">
            <field name="model">sale.reporting.country.subdivision.time_series</field>
            <field name="type">graph</field>
            <field name="name">sale_reporting_main_time_series_graph_number</field>
        </record>

        <record model="ir.action.act_window" id="act_reporting_country_subdivision_time_series">
            <field name="name">Sales per Subdivision</field>
            <field name="res_model">sale.reporting.country.subdivision.time_series</field>
            <field name="context_model">sale.reporting.context</field>
            <field
                name="domain"
                eval="[('subdivision', '=', Eval('active_id', -1))]"
                pyson="1"/>
            <field name="order" eval="[('date', 'DESC')]" pyson="1"/>
        </record>
        <record model="ir.action.act_window.view" id="act_reporting_country_subdivision_time_series_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="reporting_country_subdivision_time_series_view_list"/>
            <field name="act_window" ref="act_reporting_country_subdivision_time_series"/>
        </record>
        <record model="ir.action.act_window.view" id="act_reporting_country_subdivision_time_series_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="reporting_country_subdivision_time_series_view_graph_revenue"/>
            <field name="act_window" ref="act_reporting_country_subdivision_time_series"/>
        </record>
        <record model="ir.action.act_window.view" id="act_reporting_country_subdivision_time_series_view3">
            <field name="sequence" eval="30"/>
            <field name="view" ref="reporting_country_subdivision_time_series_view_graph_number"/>
            <field name="act_window" ref="act_reporting_country_subdivision_time_series"/>
        </record>

        <record model="ir.rule.group" id="rule_group_reporting_country_subdivision_time_series_companies">
            <field name="name">User in companies</field>
            <field name="model">sale.reporting.country.subdivision.time_series</field>
            <field name="global_p" eval="True"/>
        </record>
        <record model="ir.rule" id="rule_reporting_country_subdivision_time_series_companies">
            <field name="domain"
                eval="[('company', 'in', Eval('companies', []))]"
                pyson="1"/>
            <field name="rule_group" ref="rule_group_reporting_country_subdivision_time_series_companies"/>
        </record>

        <record model="ir.model.access" id="access_reporting_country_subdivision_time_series">
            <field name="model">sale.reporting.country.subdivision.time_series</field>
            <field name="perm_read" eval="False"/>
            <field name="perm_write" eval="False"/>
            <field name="perm_create" eval="False"/>
            <field name="perm_delete" eval="False"/>
        </record>
        <record model="ir.model.access" id="access_reporting_country_subdivision_time_series_sale">
            <field name="model">sale.reporting.country.subdivision.time_series</field>
            <field name="group" ref="group_sale"/>
            <field name="perm_read" eval="True"/>
            <field name="perm_write" eval="False"/>
            <field name="perm_create" eval="False"/>
            <field name="perm_delete" eval="False"/>
        </record>

        <record model="ir.action.wizard" id="wizard_reporting_country_tree_open">
            <field name="name">Open Region</field>
            <field name="wiz_name">sale.reporting.country.tree.open</field>
            <field name="model">sale.reporting.country.tree</field>
        </record>
        <record model="ir.action.keyword" id="wizard_reporting_country_tree_open_keyword1">
            <field name="keyword">tree_open</field>
            <field name="model">sale.reporting.country.tree,-1</field>
            <field name="action" ref="wizard_reporting_country_tree_open"/>
        </record>

    </data>
</tryton>
