diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py index 4cc8152e4b4..b4a42e3215f 100644 --- a/addons/crm/__openerp__.py +++ b/addons/crm/__openerp__.py @@ -98,6 +98,7 @@ Dashboard for CRM will include: 'sales_team_view.xml', 'views/crm.xml', 'web_planner_data.xml', + 'sales_team_dashboard.xml', ], 'demo': [ 'crm_demo.xml', diff --git a/addons/crm/sales_team_dashboard.xml b/addons/crm/sales_team_dashboard.xml new file mode 100644 index 00000000000..c75be5ae658 --- /dev/null +++ b/addons/crm/sales_team_dashboard.xml @@ -0,0 +1,80 @@ + + + New Opportunity + crm.lead + ir.actions.act_window + form + form + [('type','=','opportunity')] + { + 'search_default_team_id': [active_id], + 'default_team_id': active_id, + 'stage_type': 'opportunity', + 'default_type': 'opportunity', + 'default_user_id': uid, + } + + + + + + crm.team.kanban + crm.team + + + + + + + + + + + + +
+ +
+
+ + + + + + + + + + + + + + + + + + +
+
+
+
\ No newline at end of file diff --git a/addons/crm/sales_team_view.xml b/addons/crm/sales_team_view.xml index 6b4e3a72b9e..16737d40962 100644 --- a/addons/crm/sales_team_view.xml +++ b/addons/crm/sales_team_view.xml @@ -79,42 +79,6 @@ Opportunities Analysis gives you an instant access to your opportunities with information such as the expected revenue, planned cost, missed deadlines or the number of interactions per opportunity. This report is mainly used by the sales manager in order to do the periodic review with the teams of the sales pipeline. - - crm.team.kanban - crm.team - - - - - - - - - - - -
- -
-
- -
-
- Leads - -
-
-
- -
-
-
-
-
- crm.team.form crm.team diff --git a/addons/sale/__openerp__.py b/addons/sale/__openerp__.py index d79683ab9fe..dbcb1f1415c 100644 --- a/addons/sale/__openerp__.py +++ b/addons/sale/__openerp__.py @@ -77,6 +77,7 @@ The Dashboard for the Sales Manager will include 'res_config_view.xml', 'views/report_saleorder.xml', 'views/sale.xml', + 'sales_team_dashboard.xml', ], 'demo': ['sale_demo.xml'], 'test': [ diff --git a/addons/sale/sales_team.py b/addons/sale/sales_team.py index 1dfc09b72cf..c0d0168f0b2 100644 --- a/addons/sale/sales_team.py +++ b/addons/sale/sales_team.py @@ -27,6 +27,19 @@ class crm_team(osv.Model): res[id] = json.dumps(values) return res + def _get_sales_to_invoice_amount(self, cr, uid, ids, field_name, arg, context=None): + obj = self.pool['sale.order'] + + res = dict.fromkeys(ids, 0) + domain = [ + ('team_id', 'in', ids), + ('state', '=', 'manual'), + ] + amounts = obj.read_group(cr, uid, domain, ['amount_total', 'team_id'], ['team_id'], context=context) + for rec in amounts: + res[rec['team_id'][0]] = rec['amount_total'] + return res + _columns = { 'use_quotations': fields.boolean('Quotations', help="Check this box to manage quotations in this sales team."), 'invoiced_forecast': fields.integer(string='Invoice Forecast', @@ -39,6 +52,9 @@ class crm_team(osv.Model): 'monthly_invoiced': fields.function(_get_invoices_data, type='char', readonly=True, string='Rate of sent invoices per duration'), + 'sales_to_invoice_amount': fields.function(_get_sales_to_invoice_amount, + type='integer', readonly=True, + string='Amount of sales to invoice'), } _defaults = { diff --git a/addons/sale/sales_team_dashboard.xml b/addons/sale/sales_team_dashboard.xml new file mode 100644 index 00000000000..f40b41df4e5 --- /dev/null +++ b/addons/sale/sales_team_dashboard.xml @@ -0,0 +1,96 @@ + + + New Quotation + sale.order + ir.actions.act_window + form + form + { + 'search_default_team_id': [active_id], + 'default_team_id': active_id, + 'default_user_id': uid, + } + + + + + + crm.team.kanban + crm.team + + + + + + + + + + + + +
+ +
+ + +
+
+
+ + +
+ + +
+
+ Define an invoicing target in the sales team settings to see the period's achievement and forecast at a glance. +
+
+ + + + +
+ Invoices +
+
+ + + + + + + + + + + +
+
+
+
\ No newline at end of file diff --git a/addons/sale/sales_team_view.xml b/addons/sale/sales_team_view.xml index 3fadbccbed1..878293438e8 100644 --- a/addons/sale/sales_team_view.xml +++ b/addons/sale/sales_team_view.xml @@ -20,53 +20,5 @@
- - crm.team.kanban - crm.team - - - - - - - - - - -
-
- Quotations - -
-
-
-
- Sales Orders - -
-
-
-
- Invoices - -
-
-
- -
- Invoiced - Forecast -
-
- -
-
Define an invoicing target in the sales team settings to see the period's achievement and forecast at a glance. -
-
-
-
-
diff --git a/addons/sales_team/__openerp__.py b/addons/sales_team/__openerp__.py index 21a8938b61a..952f3c1b2c6 100644 --- a/addons/sales_team/__openerp__.py +++ b/addons/sales_team/__openerp__.py @@ -34,7 +34,9 @@ Using this application you can manage Sales Team with CRM and/or Sales 'security/ir.model.access.csv', 'res_config_view.xml', 'sales_team_data.xml', - 'sales_team.xml',], + 'sales_team.xml', + 'sales_team_dashboard.xml', + ], 'demo': ['sales_team_demo.xml'], 'css': ['static/src/css/sales_team.css'], 'installable': True, diff --git a/addons/sales_team/sales_team.xml b/addons/sales_team/sales_team.xml index 7c1f86e45a7..b6337fd9e99 100644 --- a/addons/sales_team/sales_team.xml +++ b/addons/sales_team/sales_team.xml @@ -6,43 +6,6 @@ icon="fa-credit-card" groups="base.group_sale_salesman,base.group_sale_manager" sequence="6"/> - - - - crm.team.kanban - crm.team - - - - - - - - - -
-
- -
-
-

-
- -
-
-
-
-
-
-
-
-
- Case Teams - Search @@ -187,6 +150,7 @@ diff --git a/addons/sales_team/sales_team_dashboard.xml b/addons/sales_team/sales_team_dashboard.xml new file mode 100644 index 00000000000..b28c7c26a06 --- /dev/null +++ b/addons/sales_team/sales_team_dashboard.xml @@ -0,0 +1,60 @@ + + + + crm.team.kanban + crm.team + + + + + + + + + +
+
+
+
+
+
+ More +
+
+
+
+
+
+
+
+
+
+
+
+
+ View +
+
+
+
+ New +
+
+
+
+ Reports +
+
+
+ +
+ Settings +
+
+
+
+
+
+
+
+
\ No newline at end of file diff --git a/addons/sales_team/static/src/less/sales_team_dashboard.less b/addons/sales_team/static/src/less/sales_team_dashboard.less new file mode 100644 index 00000000000..4fedcc80691 --- /dev/null +++ b/addons/sales_team/static/src/less/sales_team_dashboard.less @@ -0,0 +1,7 @@ +.o_salesteam_kanban { + .oe_kanban_record { + min-height: 200px !important; + min-width: 500px !important; + max-width: 600px !important; + } +} \ No newline at end of file