@@ -0,0 +1,2192 @@
+# -*- coding: utf-8 -*-%0A##############################################################################%0A#%0A#    OpenERP, Open Source Management Solution%0A#    Copyright (C) 2004-2010 Tiny SPRL (%3Chttp://tiny.be%3E).%0A#%0A#    This program is free software: you can redistribute it and/or modify%0A#    it under the terms of the GNU Affero General Public License as%0A#    published by the Free Software Foundation, either version 3 of the%0A#    License, or (at your option) any later version.%0A#%0A#    This program is distributed in the hope that it will be useful,%0A#    but WITHOUT ANY WARRANTY; without even the implied warranty of%0A#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the%0A#    GNU Affero General Public License for more details.%0A#%0A#    You should have received a copy of the GNU Affero General Public License%0A#    along with this program.  If not, see %3Chttp://www.gnu.org/licenses/%3E.%0A#%0A##############################################################################%0A%0Afrom osv import fields, osv%0A%0Aclass sale_order(osv.osv):%0A    _inherit = 'sale.order'%0A%0A    def action_button_confirm(self, cr, uid, ids, context=None):%0A        # fetch the partner's id and subscribe the partner to the sale order%0A        partner = self.browse(cr, uid, ids%5B0%5D, context=context)%5B'partner_id'%5D%0A        if partner.id not in self.browse(cr, uid, ids%5B0%5D, context=context)%5B'message_follower_ids'%5D:%0A            self.message_subscribe(cr, uid, ids, %5Bpartner.id%5D, context=context)%0A        return super(sale_order, self).action_button_confirm(cr, uid, ids, context=context)%0A%0Asale_order()%0A%0Aclass mail_mail(osv.osv):%0A    _inherit = 'mail.mail'%0A%0A    def _postprocess_sent_message(self, cr, uid, mail, context=None):%0A        if mail.model == 'sale.order':%0A            so_obj = self.pool.get('sale.order')%0A            partner = so_obj.browse(cr, uid, mail.res_id, context=context)%5B'partner_id'%5D%0A            if partner.id not in so_obj.browse(cr, uid, mail.res_id, context=context)%5B'message_follower_ids'%5D:%0A                so_obj.message_subscribe(cr, uid, %5Bmail.res_id%5D, %5Bpartner.id%5D, context=context)%0A        return super(mail_mail, self)._postprocess_sent_message(cr, uid, mail=mail, context=context)%0A%0Amail_mail()

Add autofollow on sales.