diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py
index 0a824aef83e..b72ac9ee5b4 100644
--- a/addons/crm/crm_lead.py
+++ b/addons/crm/crm_lead.py
@@ -846,7 +846,7 @@ class crm_lead(base_stage, format_address, osv.osv):
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]
- return self.message_post(cr, uid, ids, body=_("Stage changed to %s.") % (stage_name), subtype="mt_crm_stage", context=context)
+ return self.message_post(cr, uid, ids, body= _("Stage changed to %s.") % (stage_name), subtype="crm.mt_lead_stage", context=context)
def case_get_note_msg_prefix(self, cr, uid, lead, context=None):
if isinstance(lead, (int, long)):
@@ -861,11 +861,11 @@ class crm_lead(base_stage, format_address, osv.osv):
def case_mark_lost_send_note(self, cr, uid, ids, context=None):
message = _("Opportunity has been lost.")
- return self.message_post(cr, uid, ids, body=message, subtype="mt_crm_lost", context=context)
+ return self.message_post(cr, uid, ids, body=message, subtype="crm.mt_lead_lost", context=context)
def case_mark_won_send_note(self, cr, uid, ids, context=None):
message = _("Opportunity has been won.")
- return self.message_post(cr, uid, ids, body=message, subtype="mt_crm_won", context=context)
+ return self.message_post(cr, uid, ids, body=message, subtype="crm.mt_lead_won", context=context)
def schedule_phonecall_send_note(self, cr, uid, ids, phonecall_id, action, context=None):
phonecall = self.pool.get('crm.phonecall').browse(cr, uid, [phonecall_id], context=context)[0]
@@ -882,7 +882,7 @@ class crm_lead(base_stage, format_address, osv.osv):
def convert_opportunity_send_note(self, cr, uid, lead, context=None):
message = _("Lead has been converted to an opportunity.")
- lead.message_post(body=message)
+ lead.message_post(body=message, subtype="crm.mt_lead_convert_to_opportunity")
return True
def onchange_state(self, cr, uid, ids, state_id, context=None):
diff --git a/addons/crm/crm_lead_data.xml b/addons/crm/crm_lead_data.xml
index b7541b6daf0..e2f1c307bfb 100644
--- a/addons/crm/crm_lead_data.xml
+++ b/addons/crm/crm_lead_data.xml
@@ -154,21 +154,56 @@
-
-
- Won
- crm.lead
-
-
- Lost
+
+ Convert to Opportunity
crm.lead
-
+
+
Stage Changed
crm.lead
+
+ Lost
+ crm.lead
+
+
+
+
+ Won
+ crm.lead
+
+
+
+ Leads Created
+ crm.case.section
+
+
+
+
+ Leads to Opportunity
+ crm.case.section
+
+
+
+
+ Leads Stage Changed
+ crm.case.section
+
+
+
+
+ Opportunity Lost
+ crm.case.section
+
+
+
+
+ Opportunity Won
+ crm.case.section
+
diff --git a/addons/crm/crm_view.xml b/addons/crm/crm_view.xml
index 99d3752529e..6fc40979fbb 100644
--- a/addons/crm/crm_view.xml
+++ b/addons/crm/crm_view.xml
@@ -131,7 +131,7 @@
-
+
diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py
index a24208d6ce0..679455e3864 100644
--- a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py
+++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py
@@ -107,13 +107,13 @@ class account_analytic_account(osv.osv):
def set_open(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'state': 'open'}, context=context)
message = _("Contract has been opened.")
- self.message_post(cr, uid, ids, body=message, context=context)
+ self.message_post(cr, uid, ids, body=message, subtype="hr_timesheet_invoice.mt_account_renewed", context=context)
return True
def set_pending(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'state': 'pending'}, context=context)
message = _("Contract has been set as pending.")
- self.message_post(cr, uid, ids, body=message, context=context)
+ self.message_post(cr, uid, ids, body=message, subtype="hr_timesheet_invoice.mt_account_renew", context=context)
return True
account_analytic_account()
diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice_data.xml b/addons/hr_timesheet_invoice/hr_timesheet_invoice_data.xml
index e82b6fd19e8..fc083300fed 100644
--- a/addons/hr_timesheet_invoice/hr_timesheet_invoice_data.xml
+++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice_data.xml
@@ -23,14 +23,37 @@
+
+ Contract to Renew
+ account.analytic.account
+
- finished
+ Contract Finished
+ account.analytic.account
+
+
+ Contract Renewed
account.analytic.account
- canceled
+ Canceled
account.analytic.account
+
+ Contract to Renew
+ crm.case.section
+
+
+
+ Contract Finished
+ crm.case.section
+
+
+
+ Contract Renewed
+ crm.case.section
+
+
diff --git a/addons/mail/static/src/js/mail_followers.js b/addons/mail/static/src/js/mail_followers.js
index d299b9eb6f6..590476ed4e1 100644
--- a/addons/mail/static/src/js/mail_followers.js
+++ b/addons/mail/static/src/js/mail_followers.js
@@ -193,12 +193,17 @@ openerp_mail_followers = function(session, mail) {
/** Display subtypes: {'name': default, followed} */
display_subtypes:function (data) {
var self = this;
+ var subtype = [];
var subtype_list_ul = this.$('.oe_subtype_list');
subtype_list_ul.empty();
var records = data[this.view.datarecord.id || this.view.dataset.ids[0]].message_subtype_data;
_(records).each(function (record, record_name) {
record.name = record_name;
record.followed = record.followed || undefined;
+ subtype.push(record);
+ })
+ subtype.sort(function(a,b){return a.id - b.id});
+ _(subtype).each(function (record) {
$(session.web.qweb.render('mail.followers.subtype', {'record': record})).appendTo( self.$('.oe_subtype_list') );
});
},
diff --git a/addons/sale/sale.py b/addons/sale/sale.py
index 3c568cc8227..2bc56d0da51 100644
--- a/addons/sale/sale.py
+++ b/addons/sale/sale.py
@@ -682,7 +682,7 @@ class sale_order(osv.osv):
def confirm_send_note(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
- self.message_post(cr, uid, [obj.id], body=_("Quotation for %s converted to Sale Order of %s %s.") % (obj.partner_id.name, obj.amount_total, obj.pricelist_id.currency_id.symbol), context=context)
+ self.message_post(cr, uid, [obj.id], body=_("Quotation for %s converted to Sale Order of %s %s.") % (obj.partner_id.name, obj.amount_total, obj.pricelist_id.currency_id.symbol), subtype="sale.mt_order_confirmed", context=context)
def cancel_send_note(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
diff --git a/addons/sale/sale_data.xml b/addons/sale/sale_data.xml
index 3fe03966da2..7d03e227e7f 100644
--- a/addons/sale/sale_data.xml
+++ b/addons/sale/sale_data.xml
@@ -43,5 +43,28 @@
This application lets you create and send quotations and process your sales orders; from delivery to invoicing.
If you need to manage your sales pipeline (leads, opportunities, phonecalls), the CRM application may be useful. Use the Settings menu to install it.
]]>
+
+
+
+ Quotation sent
+ sale.order
+
+
+
+ Sale Order Confirmed
+ sale.order
+
+
+
+ Quotation sent
+ crm.case.section
+
+
+
+
+ Sale Order Confirmed
+ crm.case.section
+
+