diff --git a/addons/crm_helpdesk/crm_helpdesk.py b/addons/crm_helpdesk/crm_helpdesk.py index 7717ae2ce21..f43bdca82e1 100644 --- a/addons/crm_helpdesk/crm_helpdesk.py +++ b/addons/crm_helpdesk/crm_helpdesk.py @@ -92,6 +92,20 @@ class crm_helpdesk(crm.crm_case, osv.osv): 'priority': lambda *a: crm.AVAILABLE_PRIORITIES[2][0], } + def case_get_note_msg_prefix(self, cr, uid, id, context=None): + return 'Case' + + def create(self, cr, uid, vals, context=None): + obj_id = super(crm_helpdesk, self).create(cr, uid, vals, context) + self.create_send_note(cr, uid, [obj_id], context=context) + return obj_id + + def create_send_note(self, cr, uid, ids, context=None): + for id in ids: + msg = '%s has been created.' % (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 message_new(self, cr, uid, msg_dict, custom_values=None, context=None): """Automatically called when new email message arrives""" res_id = super(crm_helpdesk,self).message_new(cr, uid, msg_dict, custom_values=custom_values, context=context) diff --git a/addons/crm_helpdesk/crm_helpdesk_view.xml b/addons/crm_helpdesk/crm_helpdesk_view.xml index 48681357660..669224d6e0c 100644 --- a/addons/crm_helpdesk/crm_helpdesk_view.xml +++ b/addons/crm_helpdesk/crm_helpdesk_view.xml @@ -28,7 +28,8 @@ crm.helpdesk form -
+ + @@ -89,29 +90,6 @@ icon="gtk-convert" /> - - - - - - - - -