From 33001ec5ff0c2aa0ed589ffd9094d0cdae75b745 Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Wed, 28 Aug 2013 17:14:34 +0200 Subject: [PATCH] [FIX] stock: post messages on stock.pciking instead of stock.picking.in/out to be able to display messages on the form This will only display newly posted messages, not already existing. To do so apply the following SQL command: UPDATE mail_message SET model = 'stock.picking' WHERE model = 'stock.picking.in' OR model = 'stock.picking.out'; lp bug: https://launchpad.net/bugs/1197169 fixed bzr revid: mat@openerp.com-20130828151434-5nu7o0ybguh86w6f --- addons/stock/stock.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 1f89cc3dc6a..031fb721e4b 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -3005,6 +3005,10 @@ class stock_picking_in(osv.osv): #instead of it's own workflow (which is not existing) return self.pool.get('stock.picking')._workflow_signal(cr, uid, ids, signal, context=context) + def message_post(self, *args, **kwargs): + """Post the message on stock.picking to be able to see it in the form view when using the chatter""" + return self.pool.get('stock.picking').message_post(*args, **kwargs) + _columns = { 'backorder_id': fields.many2one('stock.picking.in', 'Back Order of', states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}, help="If this shipment was split, then this field links to the shipment which contains the already processed part.", select=True), 'state': fields.selection( @@ -3056,6 +3060,10 @@ class stock_picking_out(osv.osv): #instead of it's own workflow (which is not existing) return self.pool.get('stock.picking')._workflow_signal(cr, uid, ids, signal, context=context) + def message_post(self, *args, **kwargs): + """Post the message on stock.picking to be able to see it in the form view when using the chatter""" + return self.pool.get('stock.picking').message_post(*args, **kwargs) + _columns = { 'backorder_id': fields.many2one('stock.picking.out', 'Back Order of', states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}, help="If this shipment was split, then this field links to the shipment which contains the already processed part.", select=True), 'state': fields.selection(