diff --git a/addons/sale/sale.py b/addons/sale/sale.py index c525ba04df1..fdffdf465c9 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -1031,7 +1031,7 @@ class sale_order(osv.osv): def create_send_note(self, cr, uid, ids, context=None): for obj in self.browse(cr, uid, ids, context=context): - self.message_append_note(cr, uid, [obj.id], body=_("Quotation for %s has been created.") % (obj.partner_id.name), context=context) + self.message_append_note(cr, uid, [obj.id], body=_("Quotation for %s has been created.") % (obj.partner_id.name), subtype="new", context=context) def confirm_send_note(self, cr, uid, ids, context=None): for obj in self.browse(cr, uid, ids, context=context): @@ -1039,7 +1039,7 @@ class sale_order(osv.osv): def cancel_send_note(self, cr, uid, ids, context=None): for obj in self.browse(cr, uid, ids, context=context): - self.message_append_note(cr, uid, [obj.id], body=_("Sale Order for %s cancelled.") % (obj.partner_id.name), context=context) + self.message_append_note(cr, uid, [obj.id], body=_("Sale Order for %s cancelled.") % (obj.partner_id.name), subtype="cancel", context=context) def delivery_send_note(self, cr, uid, ids, picking_id, context=None): for order in self.browse(cr, uid, ids, context=context): @@ -1051,15 +1051,15 @@ class sale_order(osv.osv): self.message_append_note(cr, uid, [order.id], body=_("Delivery Order %s scheduled for %s.") % (picking.name, picking_date_str), context=context) def delivery_end_send_note(self, cr, uid, ids, context=None): - self.message_append_note(cr, uid, ids, body=_("Order delivered."), context=context) + self.message_append_note(cr, uid, ids, body=_("Order delivered."), subtype="delivered", context=context) def invoice_paid_send_note(self, cr, uid, ids, context=None): - self.message_append_note(cr, uid, ids, body=_("Invoice paid."), context=context) + self.message_append_note(cr, uid, ids, body=_("Invoice paid."), subtype="paid", context=context) def invoice_send_note(self, cr, uid, ids, invoice_id, context=None): for order in self.browse(cr, uid, ids, context=context): for invoice in (inv for inv in order.invoice_ids if inv.id == invoice_id): - self.message_append_note(cr, uid, [order.id], body=_("Draft Invoice of %s %s waiting for validation.") % (invoice.amount_total, invoice.currency_id.symbol), context=context) + self.message_append_note(cr, uid, [order.id], body=_("Draft Invoice of %s %s waiting for validation.") % (invoice.amount_total, invoice.currency_id.symbol), subtype="pending", context=context) def action_cancel_draft_send_note(self, cr, uid, ids, context=None): return self.message_append_note(cr, uid, ids, body='Sale order has been set in draft.', context=context) diff --git a/addons/sale/sale_data.xml b/addons/sale/sale_data.xml index bbee9ca7455..974b3dd4490 100644 --- a/addons/sale/sale_data.xml +++ b/addons/sale/sale_data.xml @@ -49,5 +49,38 @@ If you need to manage your sales pipeline (leads, opportunities, phonecalls), you can install the module <i>CRM</i> from the top menu Settings. + + + new + + + + + cancel + + + + + paid + + + + pending + + + + + delivered + + + + + + + + + + +