From 6974be3d6da020ae87373310742a28c57d2e98cd Mon Sep 17 00:00:00 2001 From: Antonin Bourguignon Date: Wed, 14 Nov 2012 19:41:34 +0100 Subject: [PATCH] [IMP] remove dead code from crm_partner_to_opportunity and crm_phonecall_to_opportunity fp and al judged that phonecall2opp wizard was just a 'one more click' step instead of the wizard, a phonecall will directly be converted into an opp when clicking on the 'Convert to opp' button (todo) tests have been adapted, but some tests are still missing like 'merge lead with opp' or 'merge leads together' (todo) documentation has been improved bzr revid: abo@openerp.com-20121114184134-m37k9mwsq2hclgii --- addons/crm/__openerp__.py | 2 - addons/crm/crm_lead_demo.xml | 27 ++++++- addons/crm/crm_phonecall.py | 8 +- addons/crm/crm_phonecall_view.xml | 40 +++++----- addons/crm/test/process/merge_opportunity.yml | 25 ++---- addons/crm/wizard/__init__.py | 2 - addons/crm/wizard/crm_merge_opportunities.py | 32 +++++--- .../crm/wizard/crm_partner_to_opportunity.py | 77 ------------------- .../crm_partner_to_opportunity_view.xml | 27 ------- .../wizard/crm_phonecall_to_opportunity.py | 65 ---------------- .../crm_phonecall_to_opportunity_view.xml | 42 ---------- 11 files changed, 76 insertions(+), 271 deletions(-) delete mode 100644 addons/crm/wizard/crm_partner_to_opportunity.py delete mode 100644 addons/crm/wizard/crm_partner_to_opportunity_view.xml delete mode 100644 addons/crm/wizard/crm_phonecall_to_opportunity.py delete mode 100644 addons/crm/wizard/crm_phonecall_to_opportunity_view.xml diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py index 9e9cf42a5bc..d80d9517586 100644 --- a/addons/crm/__openerp__.py +++ b/addons/crm/__openerp__.py @@ -70,10 +70,8 @@ Dashboard for CRM will include: 'wizard/crm_lead_to_opportunity_view.xml', 'wizard/crm_phonecall_to_phonecall_view.xml', - 'wizard/crm_phonecall_to_opportunity_view.xml', 'wizard/crm_opportunity_to_phonecall_view.xml', - 'wizard/crm_partner_to_opportunity_view.xml', 'wizard/crm_merge_opportunities_view.xml', diff --git a/addons/crm/crm_lead_demo.xml b/addons/crm/crm_lead_demo.xml index 7849125282e..8dbc76f9fa3 100644 --- a/addons/crm/crm_lead_demo.xml +++ b/addons/crm/crm_lead_demo.xml @@ -247,7 +247,7 @@ Andrew Bojing Hú Incom Corporation bhu.a100@gmail.com - + Shenzhen @@ -542,6 +542,31 @@ Andrew + + opportunity + Would appreciate more information about your products + + + Agrolait + info@agrolait.com + + 69 rue de Chimay + + Wavre + 1300 + + + + 3 + + + Send Catalogue by Email + + + + + + Plan to buy a Laptop diff --git a/addons/crm/crm_phonecall.py b/addons/crm/crm_phonecall.py index bac33815794..8c787b94c84 100644 --- a/addons/crm/crm_phonecall.py +++ b/addons/crm/crm_phonecall.py @@ -256,14 +256,14 @@ class crm_phonecall(base_state, osv.osv): 'default_name': phonecall.name, } return res - + # ---------------------------------------- # OpenChatter # ---------------------------------------- def case_get_note_msg_prefix(self, cr, uid, id, context=None): return 'Phonecall' - + def case_reset_send_note(self, cr, uid, ids, context=None): message = _('Phonecall has been reset and set as open.') return self.message_post(cr, uid, ids, body=message, context=context) @@ -286,5 +286,9 @@ class crm_phonecall(base_state, osv.osv): def _call_set_partner_send_note(self, cr, uid, ids, context=None): return self.message_post(cr, uid, ids, body=_("Partner has been created."), context=context) + def action_button_convert2opportunity(self, cr, uid, ids, context=None): + #TODO + assert len(ids) == 1, 'This option should only be used for a single id at a time.' + return {} # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/crm/crm_phonecall_view.xml b/addons/crm/crm_phonecall_view.xml index 9cb09e71be2..e79fd2dbf3e 100644 --- a/addons/crm/crm_phonecall_view.xml +++ b/addons/crm/crm_phonecall_view.xml @@ -39,7 +39,7 @@ client_action_multi - + Phonecall Categories crm.case.categ @@ -60,8 +60,7 @@ - - + CRM - Phone Calls Tree crm.phonecall @@ -74,10 +73,10 @@ states="open,pending" icon="gtk-redo" name="action_make_meeting" type="object"/>