From 0cecb7a89b2c2bd296869723da06d63c26709730 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Thu, 24 May 2012 11:10:24 +0200 Subject: [PATCH] [IMP] crm_case_stage: added a 'type' selection field, to separated stages dedicated to leads to fields dedicated to opportunities (or for both). Updated views. bzr revid: tde@openerp.com-20120524091024-2xt5gvbe7xa8w1uy --- addons/crm/crm.py | 6 ++++++ addons/crm/crm_lead_data.xml | 39 ++++++++++++++++++++++++++++++------ addons/crm/crm_lead_view.xml | 2 ++ addons/crm/crm_view.xml | 3 +++ 4 files changed, 44 insertions(+), 6 deletions(-) diff --git a/addons/crm/crm.py b/addons/crm/crm.py index 19ec87666da..86d5d30382b 100644 --- a/addons/crm/crm.py +++ b/addons/crm/crm.py @@ -78,6 +78,11 @@ class crm_case_stage(osv.osv): 'state': fields.selection(AVAILABLE_STATES, 'State', required=True, help="The related state for the stage. The state of your document will automatically change regarding the selected stage. For example, if a stage is related to the state 'Close', when your document reaches this stage, it will be automatically have the 'closed' state."), 'case_default': fields.boolean('Common to All Teams', help="If you check this field, this stage will be proposed by default on each sales team. It will not assign this stage to existing teams."), 'fold': fields.boolean('Hide in Views when Empty', help="This stage is not visible, for example in status bar or kanban view, when there are no records in that stage to display."), + 'type': fields.selection([ ('lead','Lead'), + ('opportunity', 'Opportunity'), + ('both', 'Both')], + string='Type', size=16, required=True, + help="This field is used to distinguish stages related to Leads from stages related to Opportunities, or to specify stages available for both types."), } _defaults = { @@ -85,6 +90,7 @@ class crm_case_stage(osv.osv): 'probability': lambda *args: 0.0, 'state': 'draft', 'fold': False, + 'type': 'both', } class crm_case_section(osv.osv): diff --git a/addons/crm/crm_lead_data.xml b/addons/crm/crm_lead_data.xml index a1816649317..20cbb0691f5 100644 --- a/addons/crm/crm_lead_data.xml +++ b/addons/crm/crm_lead_data.xml @@ -11,49 +11,76 @@ draft - + + both + Opportunity + + open + + + lead + + Qualification open + opportunity - + Proposition open + opportunity - + Negotiation open + opportunity - + Won done + opportunity - + + Dead + + + cancel + + + lead + + Lost cancel + opportunity + Sales Department Sales - + diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml index 4dbe1405c4d..00bf0c33267 100644 --- a/addons/crm/crm_lead_view.xml +++ b/addons/crm/crm_lead_view.xml @@ -14,6 +14,8 @@ + + diff --git a/addons/crm/crm_view.xml b/addons/crm/crm_view.xml index a11e6a4ecec..c8f019e685b 100644 --- a/addons/crm/crm_view.xml +++ b/addons/crm/crm_view.xml @@ -144,6 +144,7 @@ + @@ -164,6 +165,8 @@ + +