Skip to content

Commit

Permalink
[IMP] stock_barcodes: temp
Browse files Browse the repository at this point in the history
  • Loading branch information
sergio-teruel committed Oct 3, 2024
1 parent 5fef69b commit 0fbe70e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions stock_barcodes/wizard/stock_barcodes_read_picking.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ def _compute_pending_move_ids(self):
if self.option_group_id.show_pending_moves:
self.pending_move_ids = self.todo_line_ids.filtered(
lambda t: t.state == "pending"
and any(
sm.barcode_backorder_action == "pending" for sm in t.stock_move_ids
)
)
else:
self.pending_move_ids = False
Expand Down
7 changes: 4 additions & 3 deletions stock_barcodes/wizard/stock_barcodes_read_todo_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,9 @@
class="btn-sm mx-auto d-block btn-danger btn"
context="{'wiz_barcode_id': parent.id}"
data-hotkey="3"
attrs="{'invisible': [('qty_done', '=', 0.0)]} "
>Ignore rest
attrs="{'invisible': ['|','|', ('qty_done', '=', 0.0), ('is_extra_line', '=', True), ('is_stock_move_line_origin', '=', False)]} "
>
Ignore rest
</button>
<!-- Ask for confirmation when we've got done quantities to avoid squashing quantities -->
<button
Expand All @@ -151,7 +152,7 @@
class="btn-sm mx-auto d-block btn-danger btn"
context="{'wiz_barcode_id': parent.id}"
data-hotkey="3"
attrs="{'invisible': [('qty_done', '!=', 0.0)]} "
attrs="{'invisible': ['|', '|', ('qty_done', '!=', 0.0), ('is_extra_line', '=', True), ('is_stock_move_line_origin', '=', False)]} "
confirm="You have not set any quantity to this operation and it will be removed from pending moves. Are you sure?"
>Ignore rest
</button>
Expand Down

0 comments on commit 0fbe70e

Please sign in to comment.