[MERGE] FIX lp:735348
bzr revid: tfr@openerp.com-20110323091920-zgdo0vlsab0vbyp8
This commit is contained in:
commit
630e317626
|
@ -24,6 +24,7 @@ from crm import crm
|
|||
import time
|
||||
import binascii
|
||||
import tools
|
||||
from tools.translate import _
|
||||
|
||||
CRM_CLAIM_PENDING_STATES = (
|
||||
crm.AVAILABLE_STATES[2][0], # Cancelled
|
||||
|
@ -81,6 +82,20 @@ class crm_claim(crm.crm_case, osv.osv):
|
|||
'message_ids': fields.one2many('mailgate.message', 'res_id', 'Messages', domain=[('model','=',_name)]),
|
||||
}
|
||||
|
||||
def stage_next(self, cr, uid, ids, context=None):
|
||||
stage = super(crm_claim, self).stage_next(cr, uid, ids, context=context)
|
||||
if stage:
|
||||
stage_obj = self.pool.get('crm.case.stage').browse(cr, uid, stage, context=context)
|
||||
self.history(cr, uid, ids, _("Changed Stage to: ") + stage_obj.name)
|
||||
return stage
|
||||
|
||||
def stage_previous(self, cr, uid, ids, context=None):
|
||||
stage = super(crm_claim, self).stage_previous(cr, uid, ids, context=context)
|
||||
if stage:
|
||||
stage_obj = self.pool.get('crm.case.stage').browse(cr, uid, stage, context=context)
|
||||
self.history(cr, uid, ids, _("Changed Stage to: ") + stage_obj.name)
|
||||
return stage
|
||||
|
||||
def _get_stage_id(self, cr, uid, context=None):
|
||||
"""Finds type of stage according to object.
|
||||
@param self: The object pointer
|
||||
|
|
Loading…
Reference in New Issue