[FIX]Remove useless print, useless partner_id redifining, invisible context for section_id
bzr revid: dle@openerp.com-20130205100940-fc272ogg3v58j3hj
This commit is contained in:
parent
191ff031c9
commit
83dd5d14b0
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<field name="phone"/>
|
||||
<field name="stage_id"/>
|
||||
<field name="user_id" invisible="1"/>
|
||||
<field name="section_id" invisible="context.get('invisible_section', True)"/>
|
||||
<field name="section_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</group>
|
||||
|
@ -68,7 +68,7 @@
|
|||
<field name="phone"/>
|
||||
<field name="stage_id"/>
|
||||
<field name="user_id" invisible="1"/>
|
||||
<field name="section_id" invisible="context.get('invisible_section', True)"/>
|
||||
<field name="section_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</group>
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
<field name="phone"/>
|
||||
<field name="stage_id"/>
|
||||
<field name="user_id" invisible="1"/>
|
||||
<field name="section_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
<footer>
|
||||
|
|
Loading…
Reference in New Issue