[IMP] *: implement new version of dashboards
In order to implement the next version of the dashboards in enterprise
we need to make some changes in community namely :
* Modify some search views (used in the dashboards)
* Remove the date/datetime filters from the search views as they are
duplicated with the time ranges
* Rename the menu items from Dashboard to Overview
This commit is contained in:
committed by
Adrien Dieudonne
parent
94aaa2f5b0
commit
44fd3bc808
@@ -315,7 +315,7 @@
|
||||
</record>
|
||||
|
||||
<record id="open_account_journal_dashboard_kanban" model="ir.actions.act_window">
|
||||
<field name="name">Accounting Dashboard</field>
|
||||
<field name="name">Accounting Overview</field>
|
||||
<field name="res_model">account.journal</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">kanban,form</field>
|
||||
@@ -333,5 +333,5 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_board_journal_1" name="Dashboard" action="open_account_journal_dashboard_kanban" parent="menu_finance" sequence="1" groups="account.group_account_user"/>
|
||||
<menuitem id="menu_board_journal_1" name="Overview" action="open_account_journal_dashboard_kanban" parent="menu_finance" sequence="1" groups="account.group_account_user"/>
|
||||
</odoo>
|
||||
|
||||
@@ -377,57 +377,46 @@
|
||||
<field name="model">crm.lead</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Leads">
|
||||
<field name="name" string="Lead / Customer" filter_domain="['|','|','|',('partner_name','ilike',self),('email_from','ilike',self),('contact_name','ilike',self),('name','ilike',self)]"/>
|
||||
<field name="tag_ids" string="Tag" filter_domain="[('tag_ids', 'ilike', self)]"/>
|
||||
<field name="team_id"/>
|
||||
<field name="user_id"/>
|
||||
<field name="team_id"/>
|
||||
<field name="partner_id" operator="child_of" string="Customer"/>
|
||||
<field name="create_date"/>
|
||||
<field name="country_id"/>
|
||||
<field name="city"/>
|
||||
<field name="country_id"/>
|
||||
<field name="create_date"/>
|
||||
<field name="lost_reason"/>
|
||||
<field name="stage_id"/>
|
||||
<field name="medium_id"/>
|
||||
<field name="campaign_id"/>
|
||||
<field name="source_id"/>
|
||||
<separator />
|
||||
<filter string="My Leads"
|
||||
name="assigned_to_me"
|
||||
domain="[('user_id','=',uid)]"
|
||||
domain="[('user_id', '=', uid)]"
|
||||
help="Leads that are assigned to me"/>
|
||||
<filter string="Unassigned" name="unassigned"
|
||||
domain="[('user_id','=', False)]"
|
||||
help="No salesperson"/>
|
||||
<separator />
|
||||
<filter string="Unread Messages" name="message_needaction" domain="[('message_needaction','=',True)]"/>
|
||||
<filter string="Leads" name="leads" domain="[('type', '=', 'lead')]"/>
|
||||
<filter string="Opportunities" name="opportunities" domain="[('type', '=', 'opportunity')]"/>
|
||||
<separator />
|
||||
<filter string="Current" name="current" domain="[('active', '=', True)]"/>
|
||||
<filter string="Archived" name="archived" domain="[('active', '=', False)]"/>
|
||||
<separator />
|
||||
<filter string="Exclude blacklisted"
|
||||
name='not_blacklisted' domain="[('is_blacklisted', '=', False)]"
|
||||
help="Leads that did ask to not receive mass mailing anymore"/>
|
||||
<separator/>
|
||||
<filter string="My Activities" name="activities_my"
|
||||
domain="[('activity_ids.user_id', '=', uid)]"/>
|
||||
<separator/>
|
||||
<filter string="Late Activities" name="activities_overdue"
|
||||
domain="[('activity_ids.date_deadline', '<', context_today().strftime('%Y-%m-%d'))]"
|
||||
help="Show all records which has next action date is before today"/>
|
||||
<filter string="Today Activities" name="activities_today"
|
||||
domain="[('activity_ids.date_deadline', '=', context_today().strftime('%Y-%m-%d'))]"/>
|
||||
<filter string="Future Activities" name="activities_upcoming_all"
|
||||
domain="[('activity_ids.date_deadline', '>', context_today().strftime('%Y-%m-%d'))
|
||||
]"/>
|
||||
<filter string="Won" name="won"
|
||||
domain="[('probability', '=', 100)]"/>
|
||||
<filter string="Lost" name="lost"
|
||||
domain="[('probability', '=', 0), ('active', '=', False)]"/>
|
||||
<group expand="0" string="Group By">
|
||||
<filter string="Salesperson" name="groupby_salesperson" domain="[]" context="{'group_by':'user_id'}"/>
|
||||
<filter string="Sales Team" name="groupby_team" domain="[]" context="{'group_by':'team_id'}"/>
|
||||
<filter string="Salesperson" name="salesperson" context="{'group_by':'user_id'}"/>
|
||||
<filter string="Sales Channel" name="saleschannel" context="{'group_by':'team_id'}"/>
|
||||
<filter name="stage" string="Stage" context="{'group_by':'stage_id'}"/>
|
||||
<filter name="city" string="City" context="{'group_by': 'city'}"/>
|
||||
<filter string="Country" name="country" context="{'group_by':'country_id'}" />
|
||||
<filter string="Lost Reason" name="lostreason" context="{'group_by':'lost_reason'}"/>
|
||||
<filter name="customer" string="Customer" help="Partner" domain="[]" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="Campaign" name="groupby_campaign" domain="[]" context="{'group_by':'campaign_id'}"/>
|
||||
<filter string="Medium" name="groupby_channel" domain="[]" context="{'group_by':'medium_id'}"/>
|
||||
<filter string="Source" name="groupby_source" domain="[]" context="{'group_by':'source_id'}"/>
|
||||
<filter string="Creation Date" name="groupby_createmonth" domain="[]" context="{'group_by':'create_date'}"/>
|
||||
<filter string="Company" name="company" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
|
||||
<filter string="Campaign" name="compaign" domain="[]" context="{'group_by':'campaign_id'}"/>
|
||||
<filter string="Medium" name="medium" domain="[]" context="{'group_by':'medium_id'}"/>
|
||||
<filter string="Source" name="source" domain="[]" context="{'group_by':'source_id'}"/>
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Creation Date" context="{'group_by':'create_date:month'}" name="month"/>
|
||||
<filter string="Conversion Date" name="date_conversion" context="{'group_by':'date_conversion'}"/>
|
||||
<filter string="Expected Closing Date" name="date_deadline" context="{'group_by':'date_deadline'}"/>
|
||||
<filter string="Closed Date" name="date_closed" context="{'group_by':'date_closed'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
@@ -649,7 +638,7 @@
|
||||
<pivot string="Pipeline Analysis" disable_linking="True">
|
||||
<field name="create_date" interval="month" type="row"/>
|
||||
<field name="stage_id" type="col"/>
|
||||
<field name="expected_revenue" type="measure"/>
|
||||
<field name="planned_revenue" type="measure"/>
|
||||
</pivot>
|
||||
</field>
|
||||
</record>
|
||||
@@ -678,11 +667,12 @@
|
||||
<search string="Search Opportunities">
|
||||
<field name="name" string="Opportunity" filter_domain="['|','|','|',('partner_id','ilike',self),('partner_name','ilike',self),('email_from','ilike',self),('name', 'ilike', self)]"/>
|
||||
<field name="tag_ids" string="Tag" filter_domain="[('tag_ids', 'ilike', self)]"/>
|
||||
<field name="team_id"/>
|
||||
<field name="user_id"/>
|
||||
<field name="city"/>
|
||||
<field name="partner_id" operator="child_of" string="Customer"/>
|
||||
<field name="stage_id" domain="[]"/>
|
||||
<field name="user_id"/>
|
||||
<field name="team_id"/>
|
||||
<field name="partner_id" operator="child_of" string="Customer"/>
|
||||
<field name="city"/>
|
||||
<field name="country_id"/>
|
||||
<field name="activity_type_id"/>
|
||||
<field name="activity_summary"/>
|
||||
<field name="probability"/>
|
||||
@@ -731,8 +721,9 @@
|
||||
<filter string="Source" name="source" domain="[]" context="{'group_by':'source_id'}"/>
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Creation Date" context="{'group_by':'create_date:month'}" name="month"/>
|
||||
<filter string="Expected Closing Date" name="date_deadline" context="{'group_by':'date_deadline'}"/>
|
||||
<filter string="Conversion Date" name="date_conversion" context="{'group_by': 'date_conversion'}" groups="crm.group_use_lead"/>
|
||||
<filter string="Closed Date" name="date_closed" context="{'group_by':'date_closed'}"/>
|
||||
<filter string="Expected Closing Date" name="date_deadline" context="{'group_by':'date_deadline'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
||||
@@ -377,7 +377,7 @@
|
||||
|
||||
<menuitem
|
||||
id="menu_hr_holidays_dashboard"
|
||||
name="Dashboard"
|
||||
name="Overview"
|
||||
parent="menu_hr_holidays_root"
|
||||
sequence="1"
|
||||
action="action_hr_holidays_dashboard"
|
||||
|
||||
@@ -411,7 +411,7 @@
|
||||
</record>
|
||||
|
||||
<record id="mrp_workcenter_kanban_action" model="ir.actions.act_window">
|
||||
<field name="name">Work Centers Dashboard</field>
|
||||
<field name="name">Work Centers Overview</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrp.workcenter</field>
|
||||
<field name="view_type">form</field>
|
||||
@@ -436,7 +436,7 @@
|
||||
sequence="90"/>
|
||||
|
||||
<menuitem id="menu_mrp_dashboard"
|
||||
name="Dashboard"
|
||||
name="Overview"
|
||||
action="mrp_workcenter_kanban_action"
|
||||
groups="group_mrp_routings"
|
||||
parent="menu_mrp_root"
|
||||
|
||||
@@ -873,7 +873,7 @@
|
||||
|
||||
<menuitem action="open_task_type_form" id="menu_project_config_project" name="Stages" parent="menu_project_config" sequence="3" groups="base.group_no_one"/>
|
||||
|
||||
<menuitem action="open_view_project_all" id="menu_projects" name="Dashboard" parent="menu_main_pm" sequence="1"/>
|
||||
<menuitem action="open_view_project_all" id="menu_projects" name="Projects" parent="menu_main_pm" sequence="1"/>
|
||||
<menuitem action="open_view_project_all_config" id="menu_projects_config" name="Projects" parent="menu_project_config" sequence="10"/>
|
||||
|
||||
<!-- User Form -->
|
||||
|
||||
@@ -15,7 +15,7 @@ class SaleReport(models.Model):
|
||||
name = fields.Char('Order Reference', readonly=True)
|
||||
date = fields.Datetime('Order Date', readonly=True)
|
||||
confirmation_date = fields.Datetime('Confirmation Date', readonly=True)
|
||||
product_id = fields.Many2one('product.product', 'Product', readonly=True)
|
||||
product_id = fields.Many2one('product.product', 'Product Variant', readonly=True)
|
||||
product_uom = fields.Many2one('uom.uom', 'Unit of Measure', readonly=True)
|
||||
product_uom_qty = fields.Float('Qty Ordered', readonly=True)
|
||||
qty_delivered = fields.Float('Qty Delivered', readonly=True)
|
||||
@@ -28,14 +28,14 @@ class SaleReport(models.Model):
|
||||
price_subtotal = fields.Float('Untaxed Total', readonly=True)
|
||||
untaxed_amount_to_invoice = fields.Float('Untaxed Amount To Invoice', readonly=True)
|
||||
untaxed_amount_invoiced = fields.Float('Untaxed Amount Invoiced', readonly=True)
|
||||
product_tmpl_id = fields.Many2one('product.template', 'Product Template', readonly=True)
|
||||
product_tmpl_id = fields.Many2one('product.template', 'Product', readonly=True)
|
||||
categ_id = fields.Many2one('product.category', 'Product Category', readonly=True)
|
||||
nbr = fields.Integer('# of Lines', readonly=True)
|
||||
pricelist_id = fields.Many2one('product.pricelist', 'Pricelist', readonly=True)
|
||||
analytic_account_id = fields.Many2one('account.analytic.account', 'Analytic Account', readonly=True)
|
||||
team_id = fields.Many2one('crm.team', 'Sales Team', readonly=True, oldname='section_id')
|
||||
country_id = fields.Many2one('res.country', 'Customer Country', readonly=True)
|
||||
commercial_partner_id = fields.Many2one('res.partner', 'Commercial Entity', readonly=True)
|
||||
commercial_partner_id = fields.Many2one('res.partner', 'Customer Entity', readonly=True)
|
||||
state = fields.Selection([
|
||||
('draft', 'Draft Quotation'),
|
||||
('sent', 'Quotation Sent'),
|
||||
@@ -49,7 +49,7 @@ class SaleReport(models.Model):
|
||||
discount = fields.Float('Discount %', readonly=True)
|
||||
discount_amount = fields.Float('Discount Amount', readonly=True)
|
||||
|
||||
order_id = fields.Many2one('sale.order', 'Order ID', readonly=True)
|
||||
order_id = fields.Many2one('sale.order', 'Order #', readonly=True)
|
||||
|
||||
def _query(self, with_clause='', fields={}, groupby='', from_clause=''):
|
||||
with_ = ("WITH %s" % with_clause) if with_clause else ""
|
||||
|
||||
@@ -35,9 +35,12 @@
|
||||
<filter name="quotation_sent" string="Quotation Sent" domain="[('state', '=', 'sent')]"/>
|
||||
<filter name="Sales" string="Sales Orders" domain="[('state','not in',('draft', 'cancel', 'sent'))]"/>
|
||||
<separator/>
|
||||
<field name="partner_id"/>
|
||||
<field name="product_id"/>
|
||||
<field name="user_id"/>
|
||||
<field name="team_id"/>
|
||||
<field name="product_id"/>
|
||||
<field name="categ_id"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="country_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"/>
|
||||
@@ -45,14 +48,15 @@
|
||||
<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 Country" name="country_id" context="{'group_by':'country_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="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="Confirmation Date" name="order_month" context="{'group_by':'date:month'}" help="Ordered date of the sales order"/>
|
||||
<filter string="Order Date" name="date" context="{'group_by':'date'}"/>
|
||||
<filter string="Confirmation Date" name="confirm_month" context="{'group_by':'confirmation_date:month'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
</record>
|
||||
|
||||
<record id="stock_picking_type_action" model="ir.actions.act_window">
|
||||
<field name="name">Inventory</field>
|
||||
<field name="name">Inventory Overview</field>
|
||||
<field name="res_model">stock.picking.type</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="view_type">form</field>
|
||||
@@ -119,7 +119,7 @@
|
||||
action="stock_picking_type_action"
|
||||
id="stock_picking_type_menu"
|
||||
parent="menu_stock_root" sequence="0"
|
||||
name="Dashboard"/>
|
||||
name="Overview"/>
|
||||
|
||||
<menuitem id="menu_pickingtype" name="Operations Types" parent="stock.menu_warehouse_config" action="action_picking_type_list" sequence="4"/>
|
||||
|
||||
|
||||
@@ -307,12 +307,12 @@
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_dashboard"
|
||||
name="Overview"
|
||||
name="Dashboard"
|
||||
sequence="1"
|
||||
parent="website.menu_website_configuration"/>
|
||||
|
||||
<menuitem id="menu_website_dashboard" parent="menu_dashboard"
|
||||
sequence="10" name="Sales Dashboard"
|
||||
sequence="10" name="eCommerce Dashboard"
|
||||
action="website.ir_actions_server_website_dashboard" active="0"/>
|
||||
|
||||
<menuitem id="menu_website_google_analytics" parent="menu_dashboard"
|
||||
|
||||
@@ -109,13 +109,13 @@
|
||||
<field name="model">crm.lead</field>
|
||||
<field name="inherit_id" ref="crm.view_crm_case_leads_filter"/>
|
||||
<field name="arch" type="xml">
|
||||
<filter name="customer" position="after">
|
||||
<filter name="company" position="after">
|
||||
<filter string="Assigned Partner" name="assigned_partner" domain="[]" context="{'group_by':'partner_assigned_id'}"/>
|
||||
</filter>
|
||||
<filter name="unassigned" position="after">
|
||||
<filter name="assigned_to_me" position="after">
|
||||
<filter string="My Assigned Partners" name="my_assigned_partners" domain="[('partner_assigned_id.user_id', '=', uid)]"/>
|
||||
</filter>
|
||||
<field name="partner_id" position="after">
|
||||
<field name="country_id" position="after">
|
||||
<field name="partner_assigned_id"/>
|
||||
</field>
|
||||
</field>
|
||||
|
||||
@@ -198,7 +198,7 @@
|
||||
parent="menu_catalog" groups="product.group_sale_pricelist" sequence="4"/>
|
||||
|
||||
<!-- Reporting sub-menus -->
|
||||
<menuitem id="menu_report_sales" name="Sales"
|
||||
<menuitem id="menu_report_sales" name="Online Sales"
|
||||
action="sale_report_action_dashboard"
|
||||
parent="menu_reporting" sequence="1"/>
|
||||
|
||||
|
||||
@@ -5,13 +5,24 @@
|
||||
<field name="model">sale.report</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Sales">
|
||||
<field name="partner_id"/>
|
||||
<field name="website_id" groups="website.group_multi_website"/>
|
||||
<field name="product_id"/>
|
||||
<field name="categ_id"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="country_id"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<filter string="Confirmed Orders" name="confirmed" domain="[('state', 'in', ['sale', 'done'])]"/>
|
||||
<separator/>
|
||||
<filter name="order_date" string="Order Date" date="date" default_period="last_30_days"/>
|
||||
<filter name="confirmed_date" string="Confirmed" date="confirmation_date"/>
|
||||
<group expand="0" string="Group By">
|
||||
<filter string="Website" name="groupby_website" context="{'group_by':'website_id'}" groups="website.group_multi_website"/>
|
||||
<filter string="Product" name="groupby_product" context="{'group_by':'product_id'}"/>
|
||||
<filter string="Product Category" name="groupby_product_category" context="{'group_by':'categ_id'}"/>
|
||||
<filter string="Customer" name="groupby_customer" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="Customer Country" name="groupby_country" context="{'group_by':'country_id'}"/>
|
||||
<filter string="Status" name="groupby_status" context="{'group_by':'state'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Order Date" name="groupby_order_date" context="{'group_by':'date'}"/>
|
||||
<filter string="Confirmation Date" name="groupby_confirmation_date" context="{'group_by':'confirmation_date'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
@@ -40,7 +51,7 @@
|
||||
</record>
|
||||
|
||||
<record id="sale_report_action_dashboard" model="ir.actions.act_window">
|
||||
<field name="name">Sales</field>
|
||||
<field name="name">Online Sales Analysis</field>
|
||||
<field name="res_model">sale.report</field>
|
||||
<field name="view_mode">pivot,graph</field>
|
||||
<field name="domain">[('state','in',('sale', 'done')), ('team_id.team_type', '=', 'website')]</field>
|
||||
|
||||
@@ -20,7 +20,20 @@
|
||||
<field name="model">sale.report</field>
|
||||
<field name="inherit_id" ref="website_sale.sale_report_view_search_website"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='partner_id']" position="before">
|
||||
<xpath expr="//field[@name='country_id']" position="after">
|
||||
<field name="campaign_id"/>
|
||||
<field name="medium_id"/>
|
||||
<field name="source_id"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_order_product_search_inherit" model="ir.ui.view">
|
||||
<field name="name">sale.report.search.inherit</field>
|
||||
<field name="model">sale.report</field>
|
||||
<field name="inherit_id" ref="sale.view_order_product_search"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='country_id']" position="after">
|
||||
<field name="campaign_id"/>
|
||||
<field name="medium_id"/>
|
||||
<field name="source_id"/>
|
||||
|
||||
Reference in New Issue
Block a user