[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 odoo/odoo#31810 Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
This commit is contained in:
@@ -651,7 +651,7 @@ class Picking(models.Model):
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user