credativ team mailing list archive
-
credativ team
-
Mailing list archive
-
Message #06149
[Branch ~credativ/openobject-addons/6.1] Rev 7076: [IMP] Re-order when the opp becomes 'done' so security can be applied correctly to prevent change...
------------------------------------------------------------
revno: 7076
committer: Craig Gowing (credativ) <craig.gowing@xxxxxxxxxxxxxx>
branch nick: addons
timestamp: Tue 2015-12-22 16:29:07 +0000
message:
[IMP] Re-order when the opp becomes 'done' so security can be applied correctly to prevent changes on 'done' opps
modified:
crm/crm_lead.py
--
lp:~credativ/openobject-addons/6.1
https://code.launchpad.net/~credativ/openobject-addons/6.1
Your team credativ is subscribed to branch lp:~credativ/openobject-addons/6.1.
To unsubscribe from this branch go to https://code.launchpad.net/~credativ/openobject-addons/6.1/+edit-subscription
=== modified file 'crm/crm_lead.py'
--- crm/crm_lead.py 2012-06-01 14:17:43 +0000
+++ crm/crm_lead.py 2015-12-22 16:29:07 +0000
@@ -319,7 +319,6 @@
def case_mark_lost(self, cr, uid, ids, *args):
"""Mark the case as lost: state = done and probability = 0%
"""
- res = super(crm_lead, self).case_close(cr, uid, ids, *args)
self.write(cr, uid, ids, {'probability' : 0.0})
for l in self.browse(cr, uid, ids):
stage_id = self.stage_find_lost(cr, uid, l.section_id.id or False)
@@ -327,12 +326,12 @@
self.stage_set(cr, uid, [l.id], stage_id)
message = _("The opportunity '%s' has been marked as lost.") % l.name
self.log(cr, uid, l.id, message)
+ res = super(crm_lead, self).case_close(cr, uid, ids, *args)
return res
def case_mark_won(self, cr, uid, ids, *args):
"""Mark the case as lost: state = done and probability = 0%
"""
- res = super(crm_lead, self).case_close(cr, uid, ids, *args)
self.write(cr, uid, ids, {'probability' : 100.0})
for l in self.browse(cr, uid, ids):
stage_id = self.stage_find_won(cr, uid, l.section_id.id or False)
@@ -340,6 +339,7 @@
self.stage_set(cr, uid, [l.id], stage_id)
message = _("The opportunity '%s' has been been won.") % l.name
self.log(cr, uid, l.id, message)
+ res = super(crm_lead, self).case_close(cr, uid, ids, *args)
return res
def set_priority(self, cr, uid, ids, priority):