From 83dd5d14b0d7702d2a2a900d46abaf7a57c9c848 Mon Sep 17 00:00:00 2001
From: "dle@openerp.com" <>
Date: Tue, 5 Feb 2013 11:09:40 +0100
Subject: [PATCH] [FIX]Remove useless print, useless partner_id redifining,
invisible context for section_id
bzr revid: dle@openerp.com-20130205100940-fc272ogg3v58j3hj
---
addons/crm/crm_lead.py | 8 --------
addons/crm/wizard/crm_lead_to_opportunity.py | 2 --
addons/crm/wizard/crm_lead_to_opportunity_view.xml | 4 ++--
addons/crm/wizard/crm_merge_opportunities_view.xml | 1 +
4 files changed, 3 insertions(+), 12 deletions(-)
diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py
index c37a7eac0a4..0dbdc8c4038 100644
--- a/addons/crm/crm_lead.py
+++ b/addons/crm/crm_lead.py
@@ -474,14 +474,9 @@ class crm_lead(base_stage, format_address, osv.osv):
def _merge_get_result_stage(self, cr, uid, opps, context=None):
stage = None
for opp in opps:
- print opp.stage_id.id
- print opp.stage_id.name
if not stage:
stage = opp.stage_id.id
if opp.type == 'opportunity':
- print 'Opp found, return:'
- print opp.stage_id.id
- print opp.stage_id.name
return opp.stage_id.id
return stage
@@ -534,7 +529,6 @@ class crm_lead(base_stage, format_address, osv.osv):
# Define the resulting type ('lead' or 'opportunity')
data['type'] = self._merge_get_result_type(cr, uid, opportunities, context)
data['stage_id'] = self._merge_get_result_stage(cr, uid, opportunities, context)
- print data['stage_id']
return data
def _merge_find_oldest(self, cr, uid, ids, context=None):
@@ -764,8 +758,6 @@ class crm_lead(base_stage, format_address, osv.osv):
res = False
res_partner = self.pool.get('res.partner')
if partner_id:
- if lead.section_id:
- print '---TESTTRUE---'
res_partner.write(cr, uid, partner_id, {'section_id': lead.section_id and lead.section_id.id or False})
contact_id = res_partner.address_get(cr, uid, [partner_id])['default']
res = lead.write({'partner_id': partner_id}, context=context)
diff --git a/addons/crm/wizard/crm_lead_to_opportunity.py b/addons/crm/wizard/crm_lead_to_opportunity.py
index efdb69fbfba..32396b95f4e 100644
--- a/addons/crm/wizard/crm_lead_to_opportunity.py
+++ b/addons/crm/wizard/crm_lead_to_opportunity.py
@@ -35,7 +35,6 @@ class crm_lead2opportunity_partner(osv.osv_memory):
('merge', 'Merge with existing opportunities')
], 'Conversion Action', required=True),
'opportunity_ids': fields.many2many('crm.lead', string='Opportunities'),
- 'partner_id': fields.many2one('res.partner', 'Customer'),
}
def default_get(self, cr, uid, fields, context=None):
@@ -144,7 +143,6 @@ class crm_lead2opportunity_partner(osv.osv_memory):
lead = self.pool.get('crm.lead')
lead_ids = context.get('active_ids', [])
data = self.browse(cr, uid, ids, context=context)[0]
- print repr(data._table._columns)
partner_id = data.partner_id and data.partner_id.id or False
return lead.handle_partner_assignation(cr, uid, lead_ids, data.action, partner_id, context=context)
diff --git a/addons/crm/wizard/crm_lead_to_opportunity_view.xml b/addons/crm/wizard/crm_lead_to_opportunity_view.xml
index 48145757d32..8bfd60fccec 100644
--- a/addons/crm/wizard/crm_lead_to_opportunity_view.xml
+++ b/addons/crm/wizard/crm_lead_to_opportunity_view.xml
@@ -22,7 +22,7 @@
-
+
@@ -68,7 +68,7 @@
-
+
diff --git a/addons/crm/wizard/crm_merge_opportunities_view.xml b/addons/crm/wizard/crm_merge_opportunities_view.xml
index 01a21872ca0..1dc98b6b68f 100644
--- a/addons/crm/wizard/crm_merge_opportunities_view.xml
+++ b/addons/crm/wizard/crm_merge_opportunities_view.xml
@@ -19,6 +19,7 @@
+