From 80677fbbe8cb4d8fb16f16896ed6d871ac5c7377 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Fri, 1 Jun 2012 14:20:45 +0200 Subject: [PATCH] [CLEAN] crm_fundraising: cleaned code before merging. bzr revid: tde@openerp.com-20120601122045-pabt3nzqfkjfaalc --- addons/crm_fundraising/crm_fundraising.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/addons/crm_fundraising/crm_fundraising.py b/addons/crm_fundraising/crm_fundraising.py index d391c329050..359a8abb2d7 100644 --- a/addons/crm_fundraising/crm_fundraising.py +++ b/addons/crm_fundraising/crm_fundraising.py @@ -69,11 +69,6 @@ class crm_fundraising(base_stage, osv.osv): 'duration': fields.float('Duration'), 'ref': fields.reference('Reference', selection=crm._links_get, size=128), 'ref2': fields.reference('Reference 2', selection=crm._links_get, size=128), - 'state': fields.selection(crm.AVAILABLE_STATES, 'Status', size=16, readonly=True, - help='The state is set to \'Draft\', when a case is created.\ - \nIf the case is in progress the state is set to \'Open\'.\ - \nWhen the case is over, the state is set to \'Done\'.\ - \nIf the case needs to be reviewed then the state is set to \'Pending\'.'), 'state': fields.related('stage_id', 'state', type="selection", store=True, selection=crm.AVAILABLE_STATES, string="State", readonly=True, help='The state is set to \'Draft\', when a case is created.\ @@ -151,15 +146,15 @@ class crm_fundraising(base_stage, osv.osv): # OpenChatter methods and notifications # --------------------------------------------------- + def case_get_note_msg_prefix(self, cr, uid, id, context=None): + """ Override of default prefix for notifications. """ + return 'Fundraising' + def create_send_note(self, cr, uid, ids, context=None): msg = '%s has been created.' % (self.case_get_note_msg_prefix(cr, uid, ids, context=context)) self.message_append_note(cr, uid, ids, body=msg, context=context) return True - def case_get_note_msg_prefix(self, cr, uid, id, context=None): - """ Override of default prefix for notifications. """ - return 'Fundraising' - def stage_set_send_note(self, cr, uid, ids, stage_id, context=None): """ Override of the (void) default notification method. """ stage_name = self.pool.get('crm.case.stage').name_get(cr, uid, [stage_id], context=context)[0][1]