openerp-dev-web team mailing list archive
-
openerp-dev-web team
-
Mailing list archive
-
Message #04249
[Merge] lp:~openerp-dev/openobject-addons/trunk-bug-735348-rme into lp:openobject-addons
Ravindra Mekhiya(OpenERP) has proposed merging lp:~openerp-dev/openobject-addons/trunk-bug-735348-rme into lp:openobject-addons.
Requested reviews:
OpenERP buildbot (openerp-buildbot)
Related bugs:
Bug #735348 in OpenERP Addons: "Claim History having problem"
https://bugs.launchpad.net/openobject-addons/+bug/735348
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-735348-rme/+merge/53622
Hello,
Code optimization has been corrected.
Thanks.
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-735348-rme/+merge/53622
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/trunk-bug-735348-rme.
=== modified file 'crm_claim/crm_claim.py'
--- crm_claim/crm_claim.py 2011-02-15 09:42:10 +0000
+++ crm_claim/crm_claim.py 2011-03-16 12:47:58 +0000
@@ -24,6 +24,7 @@
import time
import binascii
import tools
+from tools.translate import _
CRM_CLAIM_PENDING_STATES = (
crm.AVAILABLE_STATES[2][0], # Cancelled
@@ -81,6 +82,20 @@
'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
Follow ups