Skip to content
Permalink
Browse files

[FIX] stock: show all not scrapped move

When a move is created in a picking through the scrap button, it must
not be visible in the picking, and should be accible through the
stat button showing the srap.

Now to hide, those moves from the picking view, we are checking that the
move has a different picking type than the one on the picking, which can
lead to invisible moves, that are not in the picking view because they
have a different picking type and not in the scrap stat button because
they don't have scrap object.

To fix this behavior, we are hiding from the picking the ones having a
scrap object linked instead of the one having a different picking type

closes #31810

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
  • Loading branch information...
pimodoo committed Mar 13, 2019
1 parent 3f8b044 commit 5e58be6508b978339f8f3a035f5d4cd511cb79b6
Showing with 1 addition and 1 deletion.
  1. +1 −1 addons/stock/models/stock_picking.py
@@ -651,7 +651,7 @@ def _compute_move_without_package(self):
move_ids_without_package |= move
else:
move_ids_without_package |= move
picking.move_ids_without_package = move_ids_without_package.filtered(lambda move: move.picking_type_id == picking.picking_type_id)
picking.move_ids_without_package = move_ids_without_package.filtered(lambda move: not move.scrap_ids)

def _set_move_without_package(self):
self.move_lines |= self.move_ids_without_package

0 comments on commit 5e58be6

Please sign in to comment.
You can’t perform that action at this time.