diff --git a/addons/sale/sale.py b/addons/sale/sale.py index cc6e5f71f30..ba85a62ca1d 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -1028,7 +1028,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_post(cr, uid, [obj.id], body=_("Quotation for %s has been created.") % (obj.partner_id.name), subtype_xml_id="sale_subtype_new", context=context) + self.message_post(cr, uid, [obj.id], body=_("Quotation for %s has been created.") % (obj.partner_id.name), subtype_xml_id="mt_sale_new", context=context) def confirm_send_note(self, cr, uid, ids, context=None): for obj in self.browse(cr, uid, ids, context=context): @@ -1036,7 +1036,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_post(cr, uid, [obj.id], body=_("Sale Order for %s cancelled.") % (obj.partner_id.name), subtype_xml_id="sale_subtype_cancelled", context=context) + self.message_post(cr, uid, [obj.id], body=_("Sale Order for %s cancelled.") % (obj.partner_id.name), context=context) def delivery_send_note(self, cr, uid, ids, picking_id, context=None): for order in self.browse(cr, uid, ids, context=context): @@ -1048,7 +1048,7 @@ class sale_order(osv.osv): self.message_post(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_post(cr, uid, ids, body=_("Order delivered."), subtype_xml_id="sale_subtype_delivered", context=context) + self.message_post(cr, uid, ids, body=_("Order delivered."), subtype_xml_id="mt_sale_delivered", context=context) def invoice_paid_send_note(self, cr, uid, ids, context=None): self.message_post(cr, uid, ids, body=_("Invoice paid."), subtype_xml_id="sale_subtype_paid", context=context) @@ -1056,7 +1056,7 @@ class sale_order(osv.osv): 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_post(cr, uid, [order.id], body=_("Draft Invoice of %s %s waiting for validation.") % (invoice.amount_total, invoice.currency_id.symbol), subtype_xml_id="sale_subtype_pending", context=context) + self.message_post(cr, uid, [order.id], body=_("Draft Invoice of %s %s waiting for validation.") % (invoice.amount_total, invoice.currency_id.symbol), context=context) def action_cancel_draft_send_note(self, cr, uid, ids, context=None): return self.message_post(cr, uid, ids, body=_('Sale order set to draft.'), context=context) diff --git a/addons/sale/sale_data.xml b/addons/sale/sale_data.xml index 4337c4bd1e8..3be79035fc6 100644 --- a/addons/sale/sale_data.xml +++ b/addons/sale/sale_data.xml @@ -44,26 +44,16 @@ 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 + + create sale.order - - cancelled - sale.order - - - + paid sale.order - - pending - sale.order - - - + delivered sale.order