From f554db5c6bc94b3e9fdf5aa67a0030cbb4026df2 Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Thu, 13 Sep 2012 17:10:44 +0530 Subject: [PATCH] [IMP]add subtype for crm_claim bzr revid: sgo@tinyerp.com-20120913114044-0spnm47pty5g04wu --- addons/crm_claim/crm_claim.py | 6 +++--- addons/crm_claim/crm_claim_data.xml | 26 ++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/addons/crm_claim/crm_claim.py b/addons/crm_claim/crm_claim.py index 535f6d20367..ce2427b9752 100644 --- a/addons/crm_claim/crm_claim.py +++ b/addons/crm_claim/crm_claim.py @@ -238,16 +238,16 @@ class crm_claim(base_stage, osv.osv): def create_send_note(self, cr, uid, ids, context=None): msg = _('Claim has been created.') - return self.message_post(cr, uid, ids, body=msg, context=context) + return self.message_post(cr, uid, ids, body=msg, subtype_xml_id='claim_subtype_new', context=context) def case_refuse_send_note(self, cr, uid, ids, context=None): msg = _('Claim has been refused.') - return self.message_post(cr, uid, ids, body=msg, context=context) + return self.message_post(cr, uid, ids, body=msg, subtype_xml_id='claim_subtype_refused', context=context) 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.claim.stage').name_get(cr, uid, [stage_id], context=context)[0][1] - return self.message_post(cr, uid, ids, body= _("Stage changed to %s.") % (stage_name), context=context) + return self.message_post(cr, uid, ids, body= _("Stage changed to %s.") % (stage_name), subtype_xml_id='claim_subtype_stage_change', context=context) class res_partner(osv.osv): diff --git a/addons/crm_claim/crm_claim_data.xml b/addons/crm_claim/crm_claim_data.xml index 33bd280c364..a72c285f506 100644 --- a/addons/crm_claim/crm_claim_data.xml +++ b/addons/crm_claim/crm_claim_data.xml @@ -75,6 +75,32 @@ + + + + new + crm.claim + + + + refused + crm.claim + + + + stage change + crm.claim + + + cancelled + crm.claim + + + + closed + crm.claim + +