Merge lp:~openerp-dev/openobject-addons/trunk-bug-1129876-dhruvit into lp:openobject-addons

Proposed by Dhruvit Darji(OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-1129876-dhruvit
Merge into: lp:openobject-addons
Diff against target: 12 lines (+2/-0)
1 file modified
base_status/base_stage.py (+2/-0)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-1129876-dhruvit
Reviewer Review Type Date Requested Status
Nimesh Contractor(Open ERP) (community) Approve
OpenERP Core Team Pending
Review via email: mp+151435@code.launchpad.net

Description of the change

Hello,

     If statge is not availble then raise warning insted of silent failing.

Thanks,
Dhruvit.

To post a comment you must log in.
Revision history for this message
Nimesh Contractor(Open ERP) (nco-openerp) :
review: Approve

Unmerged revisions

8592. By Dhruvit Darji(OpenERP)

[FIX] if state not available then raise warning.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'base_status/base_stage.py'
2--- base_status/base_stage.py 2012-12-21 13:48:10 +0000
3+++ base_status/base_stage.py 2013-03-04 09:07:26 +0000
4@@ -139,6 +139,8 @@
5 stage_id = self.stage_find(cr, uid, [case], None, [('state', '=', state_name)], context=context)
6 if stage_id:
7 self.stage_set(cr, uid, [case.id], stage_id, context=context)
8+ else:
9+ raise osv.except_osv(_('State not Found!'), _("You must create '%s' state first !") % (state_name))
10 return True
11
12 def stage_set(self, cr, uid, ids, stage_id, context=None):

Subscribers

People subscribed via source and target branches

to all changes: