Merge lp:~openerp-dev/openobject-addons/trunk-bug-735348-rme into lp:openobject-addons

Proposed by Ravindra Mekhiya(OpenERP)
Status: Merged
Approved by: tfr (Openerp)
Approved revision: no longer in the source branch.
Merged at revision: 4569
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-735348-rme
Merge into: lp:openobject-addons
Diff against target: 32 lines (+15/-0)
1 file modified
crm_claim/crm_claim.py (+15/-0)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-735348-rme
Reviewer Review Type Date Requested Status
OpenERP buildbot (community) Disapprove
Review via email: mp+53622@code.launchpad.net

This proposal supersedes a proposal from 2011-03-16.

Description of the change

Hello,

Code optimization has been corrected.

Thanks.

To post a comment you must log in.
Revision history for this message
Bhumika Shrimali (sbh-openerp) wrote : Posted in a previous version of this proposal

Hello,

It is copy paste the code of crm module, you need to change on stage method.

Thanks

Revision history for this message
OpenERP buildbot (openerp-buildbot) wrote : Posted in a previous version of this proposal

hr_evaluation/test/test_hr_evaluation.yml: ('warning', 'Warning !')
project_timesheet/test/worktask_entry_to_timesheetline_entry.yml[warning]: Assertion "After hr manager's work task" FAILED test: len(timesheet_ids) > 0 values: ! 0 > 0
~/addons/anonymization/anonymization.py:298[pywarn]: The behavior of this method will change in future versions. Use specific 'len(elem)' or 'elem is not None' test instead.
~/addons/anonymization/anonymization.py:300[pywarn]: The behavior of this method will change in future versions. Use specific 'len(elem)' or 'elem is not None' test instead.

review: Disapprove
Revision history for this message
OpenERP buildbot (openerp-buildbot) wrote :

hr_evaluation/test/test_hr_evaluation.yml: ('warning', 'Warning !')
project_timesheet/test/worktask_entry_to_timesheetline_entry.yml[warning]: Assertion "After hr manager's work task" FAILED test: len(timesheet_ids) > 0 values: ! 0 > 0
~/addons/anonymization/anonymization.py:298[pywarn]: The behavior of this method will change in future versions. Use specific 'len(elem)' or 'elem is not None' test instead.
~/addons/anonymization/anonymization.py:300[pywarn]: The behavior of this method will change in future versions. Use specific 'len(elem)' or 'elem is not None' test instead.

review: Disapprove

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'crm_claim/crm_claim.py'
2--- crm_claim/crm_claim.py 2011-02-15 09:42:10 +0000
3+++ crm_claim/crm_claim.py 2011-03-16 12:47:58 +0000
4@@ -24,6 +24,7 @@
5 import time
6 import binascii
7 import tools
8+from tools.translate import _
9
10 CRM_CLAIM_PENDING_STATES = (
11 crm.AVAILABLE_STATES[2][0], # Cancelled
12@@ -81,6 +82,20 @@
13 'message_ids': fields.one2many('mailgate.message', 'res_id', 'Messages', domain=[('model','=',_name)]),
14 }
15
16+ def stage_next(self, cr, uid, ids, context=None):
17+ stage = super(crm_claim, self).stage_next(cr, uid, ids, context=context)
18+ if stage:
19+ stage_obj = self.pool.get('crm.case.stage').browse(cr, uid, stage, context=context)
20+ self.history(cr, uid, ids, _("Changed Stage to: ") + stage_obj.name)
21+ return stage
22+
23+ def stage_previous(self, cr, uid, ids, context=None):
24+ stage = super(crm_claim, self).stage_previous(cr, uid, ids, context=context)
25+ if stage:
26+ stage_obj = self.pool.get('crm.case.stage').browse(cr, uid, stage, context=context)
27+ self.history(cr, uid, ids, _("Changed Stage to: ") + stage_obj.name)
28+ return stage
29+
30 def _get_stage_id(self, cr, uid, context=None):
31 """Finds type of stage according to object.
32 @param self: The object pointer

Subscribers

People subscribed via source and target branches

to all changes: