diff --git a/addons/crm_claim/crm_claim.py b/addons/crm_claim/crm_claim.py index 1829aa9a171..b7ffe764a03 100644 --- a/addons/crm_claim/crm_claim.py +++ b/addons/crm_claim/crm_claim.py @@ -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