From 4790f4a1757ea87e0efef9f4c665655fac502221 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Tue, 22 May 2012 10:30:17 +0200 Subject: [PATCH] [FIX] crm_base: case_pending now calls case_pending_send_note instead of case_reset_send_note. bzr revid: tde@openerp.com-20120522083017-9hv0loxlso806nzk --- addons/crm/crm.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/addons/crm/crm.py b/addons/crm/crm.py index 034e5db7d3d..15d0e6aac2b 100644 --- a/addons/crm/crm.py +++ b/addons/crm/crm.py @@ -292,7 +292,7 @@ class crm_base(object): def case_reset(self, cr, uid, ids, context=None): """ Resets case as draft """ self.case_set(cr, uid, ids, 'draft', {'active': True}, context=context) - self.case_reset_send_note(cr, uid, ids, context=context) + self.case_pending_send_note(cr, uid, ids, context=context) return True def case_set(self, cr, uid, ids, state_name, update_values=None, context=None): @@ -340,6 +340,12 @@ class crm_base(object): self.message_append_note(cr, uid, [id], body=msg, context=context) return True + def case_pending_send_note(self, cr, uid, ids, context=None): + for id in ids: + msg = '%s is now pending.' % (self.case_get_note_msg_prefix(cr, uid, id, context=context)) + self.message_append_note(cr, uid, [id], body=msg, context=context) + return True + def case_reset_send_note(self, cr, uid, ids, context=None): for id in ids: msg = '%s has been renewed.' % (self.case_get_note_msg_prefix(cr, uid, id, context=context))