From a0797d3b35cc235048e7947dd7a3d38e18c3e350 Mon Sep 17 00:00:00 2001 From: Daniel Dico Date: Sun, 10 Aug 2014 21:19:47 -0400 Subject: [PATCH] [IMP] purchase: method action_picking_create return picking_id Returning `picking_id` can be useful for overrides. In addition, when there is no return statement, the method basically returns None. As this is a public method (not beginning with '_'), it can be called with an xmlrpc call, and `None` is not an accepted return value for the xmlrpc protocol. Closes #1714 --- addons/purchase/purchase.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index 778863841c7..bb21b7915a2 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -870,6 +870,7 @@ class purchase_order(osv.osv): } picking_id = self.pool.get('stock.picking').create(cr, uid, picking_vals, context=context) self._create_stock_moves(cr, uid, order, order.order_line, picking_id, context=context) + return picking_id def picking_done(self, cr, uid, ids, context=None): self.write(cr, uid, ids, {'shipped':1,'state':'approved'}, context=context)