From: Thibault Delavallée Date: Tue, 21 May 2013 12:36:24 +0000 (+0200) Subject: [MERGE] Sync with trunk X-Git-Tag: InsPy_master01~1277^2~3 X-Git-Url: http://git.inspyration.org/?a=commitdiff_plain;h=b1e0f9f6f2c845de9837b6936d1cea0cb9554ce1;hp=-c;p=odoo%2Fodoo.git [MERGE] Sync with trunk bzr revid: tde@openerp.com-20130521123624-u6cqs144rbuzrmpo --- b1e0f9f6f2c845de9837b6936d1cea0cb9554ce1 diff --combined addons/crm/crm_lead.py index c2ea6f0,4e5dee5..2a3f43a --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@@ -274,7 -274,7 +274,7 @@@ class crm_lead(base_stage, format_addre 'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority', select=True), 'date_closed': fields.datetime('Closed', readonly=True), 'stage_id': fields.many2one('crm.case.stage', 'Stage', track_visibility='onchange', - domain="['&', '&', ('fold', '=', False), ('section_ids', '=', section_id), '|', ('type', '=', type), ('type', '=', 'both')]"), + domain="['&', ('section_ids', '=', section_id), '|', ('type', '=', type), ('type', '=', 'both')]"), 'user_id': fields.many2one('res.users', 'Salesperson', select=True, track_visibility='onchange'), 'referred': fields.char('Referred By', size=64), 'date_open': fields.datetime('Opened', readonly=True), @@@ -982,16 -982,6 +982,16 @@@ return [lead.section_id.message_get_reply_to()[0] if lead.section_id else False for lead in self.browse(cr, uid, ids, context=context)] + def _get_formview_action(self, cr, uid, id, context=None): + action = super(crm_lead, self)._get_formview_action(cr, uid, id, context=context) + obj = self.browse(cr, uid, id, context=context) + if obj.type == 'opportunity': + model, view_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'crm', 'crm_case_form_view_oppor') + action.update({ + 'views': [(view_id, 'form')], + }) + return action + def message_get_suggested_recipients(self, cr, uid, ids, context=None): recipients = super(crm_lead, self).message_get_suggested_recipients(cr, uid, ids, context=context) for lead in self.browse(cr, uid, ids, context=context):