From 102064ee0d7db94c6abd07ff3b3f44b3b732d8d2 Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Mon, 4 Mar 2013 16:33:25 +0100 Subject: [PATCH] [ADD] data for gamification plan in the sale_crm module bzr revid: mat@openerp.com-20130304153325-nzc6f04groiuqsn8 --- addons/gamification_sale_crm/__init__.py | 0 addons/gamification_sale_crm/__openerp__.py | 33 +++ .../gamification_sale_crm/sale_crm_goals.xml | 224 ++++++++++++++++++ 3 files changed, 257 insertions(+) create mode 100644 addons/gamification_sale_crm/__init__.py create mode 100644 addons/gamification_sale_crm/__openerp__.py create mode 100644 addons/gamification_sale_crm/sale_crm_goals.xml diff --git a/addons/gamification_sale_crm/__init__.py b/addons/gamification_sale_crm/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/addons/gamification_sale_crm/__openerp__.py b/addons/gamification_sale_crm/__openerp__.py new file mode 100644 index 00000000000..b8b9444d643 --- /dev/null +++ b/addons/gamification_sale_crm/__openerp__.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2013 Tiny SPRL (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## +{ + 'name': 'CRM Gamification', + 'version': '1.0', + 'author': 'OpenERP SA', + 'category': 'CRM', + 'depends': ['gamification','sale_crm'], + 'description': """Example of goal types and plans that can be used related to the usage of the CRM Sale module.""", + + 'data': [ + 'sale_crm_goals.xml', + ], + 'auto_install': True, +} diff --git a/addons/gamification_sale_crm/sale_crm_goals.xml b/addons/gamification_sale_crm/sale_crm_goals.xml new file mode 100644 index 00000000000..3541b658791 --- /dev/null +++ b/addons/gamification_sale_crm/sale_crm_goals.xml @@ -0,0 +1,224 @@ + + + + + + + + + Total Invoiced + + sum + + + + [('state','!=','cancel'),('user_id','=',user_id)] + + + + Delay to Open + The average number of days to open the case (less than) + sum + minus + + + + [('user_id','=',user_id)] + + + + Delay to Close + The average number of days to close the case (less than) + sum + minus + + + + [('user_id','=',user_id)] + + + + + # Logged Calls + Log a certain number of calls to reach this goal + count + + + [('user_id','=',user_id),('type','='),('state','=','done')] + + + + # New Leads + Based on the creation date + count + + + [('user_id','=',user_id)] + + + + # New Opportunities + Based on the opening date + count + + + [('user_id','=',user_id),('type','=','opportunity')] + + + + # New Sales Orders + Based on the creation date + count + + + [('user_id','=',user_id),('state','not in',('draft', 'sent', 'cancel'))] + + + + + # Paid Sales Orders + Based on the confirmation date + count + + + [('user_id','=',user_id),('paid','=',True)] + + + + Total Paid Sales Orders + Based on the confirmation date + sum + + + + [('user_id','=',user_id),('paid','=',True)] + + + + + # Customer Refunds + + count + + + [('state','!=','cancel'),('user_id','=',user_id),('type','=','out_refund')] + + + + Total Customer Refunds + + sum + + + + [('state','!=','cancel'),('user_id','=',user_id),('type','=','out_refund')] + + + + + + + + + 20000 + + + + 20 + + + + 5 + + + + 5 + + + + 4 + + + + + + + 15 + + + + 7 + + + + 5 + + + + + + + + Saleperson + monthly + board + + weekly + The following message contains the current progress of the sale team based on several criterias. The progress is reinitialised each month and shared weekly. + + + + + Marketing team + monthly + board + + weekly + The following message contains the current progress of the marketing team based on several criterias. The progress is reinitialised each month and shared weekly. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +