[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
This commit is contained in:
Daniel Dico 2014-08-10 21:19:47 -04:00 committed by Denis Ledoux
parent 6f60153e5d
commit a0797d3b35
1 changed files with 1 additions and 0 deletions

View File

@ -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)