diff --git a/addons/sale/sale.py b/addons/sale/sale.py index 19f9e9ff857..374b7cb6c17 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -1013,7 +1013,6 @@ class mail_compose_message(osv.Model): class account_invoice(osv.Model): _inherit = 'account.invoice' - def confirm_paid(self, cr, uid, ids, context=None): sale_order_obj = self.pool.get('sale.order') res = super(account_invoice, self).confirm_paid(cr, uid, ids, context=context) @@ -1021,17 +1020,4 @@ class account_invoice(osv.Model): sale_order_obj.message_post(cr, uid, so_ids, body=_("Invoice paid"), context=context) return res - -class stock_picking(osv.osv): - _inherit = 'stock.picking' - - def action_done(self, cr, uid, ids, context=None): - """ Changes picking state to done. This method is called at the end of - the workflow by the activity "done". - """ - for record in self.browse(cr, uid, ids, context): - if record.type == "out" and record.sale_id: - self.pool.get('sale.order').message_post(cr, uid, [record.sale_id.id], body=_("Products delivered"), context=context) - return super(stock_picking, self).action_done(cr, uid, ids, context=context) - # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/sale_stock/stock.py b/addons/sale_stock/stock.py index 93acf8579f5..27e7fa8c29b 100644 --- a/addons/sale_stock/stock.py +++ b/addons/sale_stock/stock.py @@ -119,6 +119,15 @@ class stock_picking(osv.osv): 'invoice_ids': [(4, invoice_id)], }) return super(stock_picking, self)._invoice_hook(cursor, user, picking, invoice_id) + + def action_done(self, cr, uid, ids, context=None): + """ Changes picking state to done. This method is called at the end of + the workflow by the activity "done". + """ + for record in self.browse(cr, uid, ids, context): + if record.type == "out" and record.sale_id: + self.pool.get('sale.order').message_post(cr, uid, [record.sale_id.id], body=_("Products delivered"), context=context) + return super(stock_picking, self).action_done(cr, uid, ids, context=context) # Redefinition of the new field in order to update the model stock.picking.out in the orm # FIXME: this is a temporary workaround because of a framework bug (ref: lp996816). It should be removed as soon as