[MERGE] merge with main addons
[odoo/odoo.git] / addons / crm_fundraising / crm_fundraising.py
index d391c32..73f7297 100644 (file)
@@ -23,6 +23,7 @@ from base_status.base_stage import base_stage
 from crm import crm
 from crm import wizard
 from osv import fields, osv
+from tools.translate import _
 
 wizard.mail_compose_message.SUPPORTED_MODELS.append('crm.fundraising')
 
@@ -69,11 +70,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 +147,15 @@ class crm_fundraising(base_stage, osv.osv):
     # OpenChatter methods and notifications
     # ---------------------------------------------------
 
-    def create_send_note(self, cr, uid, ids, context=None):
-        msg = '%s has been <b>created</b>.' % (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 create_send_note(self, cr, uid, ids, context=None):
+        msg = _('Fundraising has been <b>created</b>.')
+        self.message_append_note(cr, uid, ids, body=msg, context=context)
+        return True
+
     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]