[IMP] stock: added missing 'context' parameter (opw 616952)
This commit is contained in:
parent
ae99a93b88
commit
c6a5be0a19
|
@ -53,7 +53,7 @@ class stock_partial_move(osv.osv_memory):
|
|||
return res
|
||||
if 'move_ids' in fields:
|
||||
move_ids = self.pool.get('stock.move').browse(cr, uid, move_ids, context=context)
|
||||
moves = [self._partial_move_for(cr, uid, m) for m in move_ids if m.state not in ('done','cancel')]
|
||||
moves = [self._partial_move_for(cr, uid, m, context=context) for m in move_ids if m.state not in ('done','cancel')]
|
||||
res.update(move_ids=moves)
|
||||
if 'date' in fields:
|
||||
res.update(date=time.strftime(DEFAULT_SERVER_DATETIME_FORMAT))
|
||||
|
|
|
@ -130,7 +130,7 @@ class stock_partial_picking(osv.osv_memory):
|
|||
res.update(picking_id=picking_id)
|
||||
if 'move_ids' in fields:
|
||||
picking = self.pool.get('stock.picking').browse(cr, uid, picking_id, context=context)
|
||||
moves = [self._partial_move_for(cr, uid, m) for m in picking.move_lines if m.state not in ('done','cancel')]
|
||||
moves = [self._partial_move_for(cr, uid, m, context=context) for m in picking.move_lines if m.state not in ('done','cancel')]
|
||||
res.update(move_ids=moves)
|
||||
if 'date' in fields:
|
||||
res.update(date=time.strftime(DEFAULT_SERVER_DATETIME_FORMAT))
|
||||
|
@ -154,7 +154,7 @@ class stock_partial_picking(osv.osv_memory):
|
|||
return {'cost': move.product_id.standard_price,
|
||||
'currency': product_currency_id or picking_currency_id or False}
|
||||
|
||||
def _partial_move_for(self, cr, uid, move):
|
||||
def _partial_move_for(self, cr, uid, move, context=None):
|
||||
partial_move = {
|
||||
'product_id' : move.product_id.id,
|
||||
'quantity' : move.product_qty if move.state == 'assigned' or move.picking_id.type == 'in' else 0,
|
||||
|
|
Loading…
Reference in New Issue