[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:
parent
6f60153e5d
commit
a0797d3b35
|
@ -870,6 +870,7 @@ class purchase_order(osv.osv):
|
||||||
}
|
}
|
||||||
picking_id = self.pool.get('stock.picking').create(cr, uid, picking_vals, context=context)
|
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)
|
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):
|
def picking_done(self, cr, uid, ids, context=None):
|
||||||
self.write(cr, uid, ids, {'shipped':1,'state':'approved'}, context=context)
|
self.write(cr, uid, ids, {'shipped':1,'state':'approved'}, context=context)
|
||||||
|
|
Loading…
Reference in New Issue