From 93a6ebff04c022be656ad3a5c03503696e6807f1 Mon Sep 17 00:00:00 2001 From: "sbh (Open ERP)" Date: Tue, 9 Mar 2010 11:17:35 +0530 Subject: [PATCH 01/56] [Fix] crm: Fix the problem of partner_id bzr revid: sbh@tinyerp.com-20100309054735-mn8jhzewso7q9fdp --- addons/crm/crm_phonecall_view.xml | 1 - addons/crm/wizard/crm_phonecall2phonecall.py | 9 +++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/addons/crm/crm_phonecall_view.xml b/addons/crm/crm_phonecall_view.xml index cda27442350..53e3aa631d1 100644 --- a/addons/crm/crm_phonecall_view.xml +++ b/addons/crm/crm_phonecall_view.xml @@ -78,7 +78,6 @@ name="%(wizard_crm_phonecall_meeting_set)d" icon="gtk-redo" type="action" /> - diff --git a/addons/crm/wizard/crm_phonecall2phonecall.py b/addons/crm/wizard/crm_phonecall2phonecall.py index b6ba9f9b4c3..245c3fecc40 100644 --- a/addons/crm/wizard/crm_phonecall2phonecall.py +++ b/addons/crm/wizard/crm_phonecall2phonecall.py @@ -46,8 +46,8 @@ class crm_phonecall2phonecall(osv.osv_memory): values['user_id']=this.user_id and this.user_id.id values['categ_id']=this.category_id and this.category_id.id values['section_id']=this.section_id and this.section_id.id or False, - values['description']=this.notes - values['partner_id']=this.partner_id + values['description']=this.notes or '' + values['partner_id']=this.partner_id.id values['partner_address_id']=this.address_id.id phonecall_proxy = self.pool.get('crm.phonecall') phonecall_id = phonecall_proxy.create(cr, uid, values, context=context) @@ -75,17 +75,14 @@ class crm_phonecall2phonecall(osv.osv_memory): def default_get(self, cr, uid, fields, context=None): record_id = context and context.get('record_id', False) or False res = super(crm_phonecall2phonecall, self).default_get(cr, uid, fields, context=context) - if record_id: phonecall_id = self.pool.get('crm.phonecall').browse(cr, uid, record_id, context=context) - print ":::::::::",phonecall_id.section_id.id res['name']=phonecall_id.name res['user_id']=phonecall_id.user_id and phonecall_id.user_id.id res['section_id']=phonecall_id.section_id and phonecall_id.section_id.id - res['notes']=phonecall_id.description and phonecall_id.description + res['notes']=phonecall_id.description and phonecall_id.description or '' res['category_id']=phonecall_id.categ_id and phonecall_id.categ_id.id res['partner_id']=phonecall_id.partner_id and phonecall_id.partner_id.id res['address_id']=phonecall_id.partner_address_id and phonecall_id.partner_address_id.id - return res crm_phonecall2phonecall() \ No newline at end of file From 87bd2e84b4407abfa48e74bfe244b49968e1ee12 Mon Sep 17 00:00:00 2001 From: "sbh (Open ERP)" Date: Tue, 9 Mar 2010 14:05:43 +0530 Subject: [PATCH 02/56] [Add] crm : Add the wizard of /phonecall2opportunity bzr revid: sbh@tinyerp.com-20100309083543-uljqipt3i2r8rxzj --- addons/crm/__terp__.py | 4 +- addons/crm/crm_phonecall_view.xml | 4 +- addons/crm/wizard/__init__.py | 3 +- addons/crm/wizard/phonecall2opportunity.xml | 32 ++++++ addons/crm/wizard/phonecall_to_opportunity.py | 106 ++++++++++++++++++ 5 files changed, 145 insertions(+), 4 deletions(-) create mode 100644 addons/crm/wizard/phonecall2opportunity.xml create mode 100644 addons/crm/wizard/phonecall_to_opportunity.py diff --git a/addons/crm/__terp__.py b/addons/crm/__terp__.py index 0189cc11b2c..d1514a658cf 100644 --- a/addons/crm/__terp__.py +++ b/addons/crm/__terp__.py @@ -62,7 +62,9 @@ between mails and Open ERP.""", 'update_xml': [ 'wizard/crm_phonecall2phonecall.xml', - 'wizard/lead_to_partner_view.xml', + 'wizard/lead_to_partner_view.xml', + 'wizard/phonecall2partner_view.xml', + 'wizard/phonecall2opportunity.xml', 'crm_wizard.xml', 'crm_view.xml', diff --git a/addons/crm/crm_phonecall_view.xml b/addons/crm/crm_phonecall_view.xml index 53e3aa631d1..11516f3af56 100644 --- a/addons/crm/crm_phonecall_view.xml +++ b/addons/crm/crm_phonecall_view.xml @@ -49,7 +49,7 @@