odoo/addons/sale/report/sale_report_view.xml

277 lines
13 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_order_product_tree" model="ir.ui.view">
<field name="name">sale.report.tree</field>
<field name="model">sale.report</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Sales Analysis">
<field name="date" invisible="1"/>
<field name="user_id" invisible="1"/>
<field name="year" invisible="1"/>
<field name="day" invisible="1"/>
<field name="month" invisible="1"/>
<field name="shop_id" invisible="1"/>
<field name="company_id" invisible="1" groups="base.group_multi_company"/>
<field name="partner_id" invisible="1"/>
<field name="product_id" invisible="1"/>
<field name="categ_id" invisible="1"/>
<field name="nbr" sum="# of Lines"/>
<field name="product_uom_qty" sum="# of Qty"/>
<field name="shipped_qty_1"/>
<field name="uom_name" invisible="not context.get('set_visible',False)"/>
<field name="price_average" avg="Average Price"/>
<field name="price_total" sum="Total Price"/>
<field name="delay" avg="Days to Close"/>
<field name="state" invisible="1"/>
<field name="analytic_account_id" invisible="1"/>
</tree>
</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="type">graph</field>
<field name="arch" type="xml">
<graph string="Sales Analysis" type="bar">
<field name="product_id"/>
<field name="price_total"/>
<field name="state" group="True"/>
</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="type">search</field>
<field name="arch" type="xml">
<search string="Sales Analysis">
<group>
<filter icon="terp-go-year" string=" 365 Days "
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')),('date','&gt;',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
help="Tasks performed in last 365 days"/>
<filter icon="terp-go-month" string=" 30 Days "
name="month"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
help="Tasks performed in last 30 days"/>
<filter icon="terp-go-week"
string=" 7 Days "
separator="1"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
help="Tasks during last 7 days"/>
<separator orientation="vertical"/>
<filter icon="terp-document-new"
string="Quotations"
domain="[('state','=','draft')]"/>
<filter icon="terp-dolar"
string="Sales"
domain="[('state','not in',('draft','done','cancel'))]"/>
<separator orientation="vertical"/>
<filter icon="terp-sale"
string="Picked"
domain="[('shipped','=',True)]"/>
<separator orientation="vertical"/>
<field name="partner_id"/>
<field name="product_id"/>
<field name="user_id" widget="selection">
<filter icon="terp-dolar"
string="My Sales"
help="My Sales"
domain="[('user_id','=',uid)]"/>
</field>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="10" col="12">
<filter string="Salesman" icon="terp-personal" name="User" context="{'group_by':'user_id'}"/>
<filter string="Partner" icon="terp-personal" context="{'group_by':'partner_id'}"/>
<separator orientation="vertical"/>
<filter string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id','set_visible':True}"/>
<filter string="Default UoM" icon="terp-mrp" context="{'group_by':'uom_name'}"/>
<filter string="Category of Product" icon="terp-stock_symbol-selection" context="{'group_by':'categ_id'}"/>
<filter string="Analytic Account" icon="terp-folder-green" context="{'group_by':'analytic_account_id'}"/>
<separator orientation="vertical"/>
<filter string="State" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
<separator orientation="vertical"/>
<filter string="Shop" icon="terp-go-home" context="{'group_by':'shop_id'}"/>
<filter string="Company" icon="terp-go-home" groups="base.group_multi_company" context="{'group_by':'company_id'}"/>
<separator orientation="vertical"/>
<filter string="Day" icon="terp-go-month" context="{'group_by':'day'}"/>
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}"/>
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}"/>
</group>
<newline/>
<group expand="0" string="Extended options..." groups="base.group_extended">
<field name="date"/>
<field name="date_confirm"/>
<separator orientation="vertical"/>
<field name="shop_id" widget="selection"/>
<field name="categ_id" widget="selection"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</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_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="search_view_id" ref="view_order_product_search"/>
<field name="context">{'search_default_month':1,'search_default_User':1,'group_by_no_leaf':1,'group_by':[]}</field>
</record>
<menuitem id="base.next_id_64" name="Reporting" parent="base.menu_base_partner" sequence="8"/>
<menuitem action="action_order_report_all" id="menu_report_product_all" parent="base.next_id_64" sequence="3"/>
<record id="action_stock_move_report_so" model="ir.actions.act_window">
<field name="name">Shipments Analysis</field>
<field name="res_model">report.stock.move</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="context">{'search_default_month':1, 'search_default_group_product':1, 'search_default_group_partner':1, 'search_default_done':1, 'search_default_out': 1, 'group_by':[], 'group_by_no_leaf':1}</field>
</record>
<menuitem action="action_stock_move_report_so" id="menu_action_stock_move_report_so" parent="base.next_id_64" sequence="8"/>
<!--This views used in board_sale module -->
<record id="view_sale_order_by_clients_tree" model="ir.ui.view">
<field name="name">sale.order.by.clients.tree</field>
<field name="model">sale.order.by.clients</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Sales order by clients">
<field name="partner_id"/>
<field name="total_orders"/>
</tree>
</field>
</record>
<record id="view_sale_order_by_clients_graph" model="ir.ui.view">
<field name="name">sale.order.by.clients.graph</field>
<field name="model">sale.order.by.clients</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Sales order by clients" type="bar">
<field name="partner_id" />
<field name="total_orders" operator="+"/>
</graph>
</field>
</record>
<record id="action_sale_order_by_clients" model="ir.actions.act_window">
<field name="name">Sales Orders</field>
<field name="res_model">sale.order.by.clients</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="view_id" ref="view_sale_order_by_clients_tree"/>
</record>
<record id="view_uninvoiced_lines_per_month_tree" model="ir.ui.view">
<field name="name">uninvoiced.lines.per.month.tree</field>
<field name="model">uninvoiced.lines.per.month</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Uninvoiced lines per month">
<field name="year"/>
<field name="month"/>
<field name="number_of_lines"/>
</tree>
</field>
</record>
<record id="view_uninvoiced_lines_per_month_graph" model="ir.ui.view">
<field name="name">uninvoiced.lines.per.month.graph</field>
<field name="model">uninvoiced.lines.per.month</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Uninvoiced lines per month" type="bar">
<field name="month" />
<field name="number_of_lines" operator="+"/>
</graph>
</field>
</record>
<record id="action_suninvoiced_lines_per_month" model="ir.actions.act_window">
<field name="name">Uninvoiced Lines</field>
<field name="res_model">uninvoiced.lines.per.month</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="view_id" ref="view_uninvoiced_lines_per_month_tree"/>
</record>
<record id="view_product_bought_by_sale_order_tree" model="ir.ui.view">
<field name="name">product.bought.by.sale.order.tree</field>
<field name="model">product.bought.by.sale.order</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Product bought by sale order">
<field name="product_id"/>
<field name="month"/>
<field name="year"/>
<field name="total_products"/>
</tree>
</field>
</record>
<record id="view_product_bought_by_sale_order_graph" model="ir.ui.view">
<field name="name">product.bought.by.sale.order.graph</field>
<field name="model">product.bought.by.sale.order</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Product bought by sale order" type="bar">
<field name="product_id" select="1"/>
<field name="total_products" select="1"/>
<field name="month" group = "True"/>
</graph>
</field>
</record>
<record id="action_product_bought_by_sale_order" model="ir.actions.act_window">
<field name="name">Product bought by sale order</field>
<field name="res_model">product.bought.by.sale.order</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="domain">[('year','=', time.strftime('%Y'))]</field>
<field name="view_id" ref="view_product_bought_by_sale_order_tree"/>
</record>
<record id="view_sales_by_regions_tree" model="ir.ui.view">
<field name="name">sales.by.regions.tree</field>
<field name="model">sales.by.regions</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Sales by regions">
<field name="name"/>
<field name="total_sales"/>
</tree>
</field>
</record>
<record id="view_sales_by_regions_graph" model="ir.ui.view">
<field name="name">sales.by.regions.graph</field>
<field name="model">sales.by.regions</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Sales by regions" type="bar">
<field name="name"/>
<field name="total_sales" operator="+"/>
</graph>
</field>
</record>
<record id="action_sales_by_regions" model="ir.actions.act_window">
<field name="name">Sales by regions</field>
<field name="res_model">sales.by.regions</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="view_id" ref="view_sales_by_regions_tree"/>
</record>
</data>
</openerp>