From f17ab8b43cb728015136ace77032ca55a5e49a1b Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Mon, 9 Sep 2013 10:19:52 +0200 Subject: [PATCH] [FIX] stock: overwrite message_{un,}subscribe on stock.picking.{in,out} lp bug: https://launchpad.net/bugs/1197169 fixed bzr revid: mat@openerp.com-20130909081952-t6x482m9f3vt6xmg --- addons/stock/stock.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 031fb721e4b..9465489f0f0 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -3009,6 +3009,14 @@ class stock_picking_in(osv.osv): """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) + def message_subscribe(self, *args, **kwargs): + """Send the subscribe action on stock.picking model as it uses _name in request""" + return self.pool.get('stock.picking').message_subscribe(*args, **kwargs) + + def message_unsubscribe(self, *args, **kwargs): + """Send the unsubscribe action on stock.picking model to match with subscribe""" + return self.pool.get('stock.picking').message_unsubscribe(*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( @@ -3064,6 +3072,14 @@ class stock_picking_out(osv.osv): """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) + def message_subscribe(self, *args, **kwargs): + """Send the subscribe action on stock.picking model as it uses _name in request""" + return self.pool.get('stock.picking').message_subscribe(*args, **kwargs) + + def message_unsubscribe(self, *args, **kwargs): + """Send the unsubscribe action on stock.picking model to match with subscribe""" + return self.pool.get('stock.picking').message_unsubscribe(*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(