diff --git a/addons/crm/crm.py b/addons/crm/crm.py
index 4f2d2a120d8..b504ae70e10 100644
--- a/addons/crm/crm.py
+++ b/addons/crm/crm.py
@@ -273,7 +273,7 @@ class crm_base(object):
def _case_pending_notification(self, case, context=None):
return True
- def _case_reset_notification(self, case, context=None):
+ def _case_reset_notification(self, cr, uid, ids, context=None):
return True
def _case_escalate_notification(self, case, context=None):
@@ -339,7 +339,7 @@ class crm_base(object):
cases = self.browse(cr, uid, ids)
cases[0].state # to fill the browse record cache
self.write(cr, uid, ids, {'state': 'draft', 'active': True})
- self._case_reset_notification(cases, context=context)
+ self._case_reset_notification(cr, uid, ids, context=context)
self._action(cr, uid, cases, 'draft')
return True
@@ -489,7 +489,7 @@ class crm_case(crm_base):
cases = self.browse(cr, uid, ids)
cases[0].state # to fill the browse record cache
self.write(cr, uid, ids, {'state': state, 'active': True})
- self._case_reset_notification(cases, context=context);
+ self._case_reset_notification(cr, uid, ids, context=context)
self._action(cr, uid, cases, state)
return True
diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py
index ed9cce87a8e..46c643d6bc4 100644
--- a/addons/crm/crm_lead.py
+++ b/addons/crm/crm_lead.py
@@ -271,6 +271,14 @@ class crm_lead(crm_case, osv.osv):
def stage_find_won(self, cr, uid, section_id):
return self.stage_find_percent(cr, uid, 100.0, section_id)
+ def _case_reset_notification(self, cr, uid, ids, context=None):
+ for lead in self.browse(cr, uid, ids, context=context):
+ if lead.type == 'lead':
+ message = _("The lead is renewed.")
+ elif lead.type == 'opportunity':
+ message = _("The opportunity is renewed.")
+ lead.message_append_note('' ,message, need_action_user_id=lead.user_id.id)
+
def _case_create_notification(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
self.message_subscribe(cr, uid, ids, [obj.user_id.id], context=context)
@@ -334,13 +342,6 @@ class crm_lead(crm_case, osv.osv):
message = _("The lead is escalated.")
case.message_append_note('' ,message)
- def _case_reset_notification(self, case, context=None):
- if case[0].type == 'lead':
- message = _("The lead is renewed.")
- elif case[0].type == 'opportunity':
- message = _("The opportunity is renewed.")
- case[0].message_append_note('' ,message, need_action_user_id=case[0].user_id.id)
-
def _case_phonecall_notification(self, cr, uid, ids, case, phonecall, action, context=None):
for obj in phonecall.browse(cr, uid, ids, context=context):
if action == "schedule" :
diff --git a/addons/crm/crm_meeting.py b/addons/crm/crm_meeting.py
index 0261612c32d..22586c7b4fb 100644
--- a/addons/crm/crm_meeting.py
+++ b/addons/crm/crm_meeting.py
@@ -110,9 +110,10 @@ class crm_meeting(crm_base, osv.osv):
message = _("The meeting is done.")
meeting[0].message_append_note('' ,message)
- def _case_reset_notification(self, meeting, context=None):
- message = _("The meeting is unconfirmed.")
- meeting[0].message_append_note('' ,message)
+ def _case_reset_notification(self, cr, uid, ids, context=None):
+ for meeting in self.browse(cr, uid, ids, context=context):
+ message = _("The lead is renew.")
+ meeting.message_append_note('' ,message, need_action_user_id=meeting.user_id.id)
def _case_open_notification(self, meeting, context=None):
if meeting.state != 'draft':