[FIX] stock: reload after stock picking scrap
If a wizard is launched from an embedded view list, only the record of the line from which the wizard was launched is reloaded after closing the wizard. In this specific case, as new lines are added to the picking, we need to fully reload the stock picking
This commit is contained in:
parent
bb913d0a8f
commit
bdd5ec8216
|
@ -86,7 +86,18 @@ class stock_move_scrap(osv.osv_memory):
|
|||
move_obj.action_scrap(cr, uid, move_ids,
|
||||
data.product_qty, data.location_id.id, restrict_lot_id=data.restrict_lot_id.id,
|
||||
context=context)
|
||||
return {'type': 'ir.actions.act_window_close'}
|
||||
if context.get('active_id'):
|
||||
move = self.pool.get('stock.move').browse(cr, uid, context['active_id'], context=context)
|
||||
return {
|
||||
'view_type': 'form',
|
||||
'view_mode': 'form',
|
||||
'res_model': 'stock.picking',
|
||||
'type': 'ir.actions.act_window',
|
||||
'res_id': move.picking_id.id,
|
||||
'context': context
|
||||
}
|
||||
else:
|
||||
return {'type': 'ir.actions.act_window_close'}
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue