[FIX] previous stage didn't worked
bzr revid: tfr@openerp.com-20110206231647-dg5f50am7wsuuz7g
This commit is contained in:
parent
810204d16a
commit
8cbf5bc1f1
|
@ -219,11 +219,11 @@ class crm_case(object):
|
|||
if context is None:
|
||||
context = {}
|
||||
stage_pool = self.pool.get('crm.case.stage')
|
||||
stage_type = context and context.get('stage_type','')
|
||||
current_seq = False
|
||||
next_stage_id = False
|
||||
|
||||
for case in self.browse(cr, uid, ids, context=context):
|
||||
stage_type = case.type
|
||||
next_stage = False
|
||||
value = {}
|
||||
if case.section_id.id :
|
||||
|
|
|
@ -297,6 +297,16 @@ class crm_lead(crm_case, osv.osv):
|
|||
data = {'probability': stage_obj.probability}
|
||||
self.write(cr, uid, ids, data)
|
||||
return stage
|
||||
|
||||
def stage_previous(self, cr, uid, ids, context=None):
|
||||
stage = super(crm_lead, self).stage_previous(cr, uid, ids, context=context)
|
||||
if stage:
|
||||
stage_obj = self.pool.get('crm.case.stage').browse(cr, uid, stage, context=context)
|
||||
if stage_obj.on_change:
|
||||
data = {'probability': stage_obj.probability}
|
||||
self.write(cr, uid, ids, data)
|
||||
return stage
|
||||
|
||||
|
||||
def message_new(self, cr, uid, msg, context=None):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue