Skip to content

Commit

Permalink
[FIX] stock_barcodes: Keep values don't work after force refresh chan…
Browse files Browse the repository at this point in the history
…ges.

TT50421
  • Loading branch information
carlosdauden authored and sergio-teruel committed Sep 2, 2024
1 parent ee8c61d commit 24d9bc1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions stock_barcodes/wizard/stock_barcodes_read_picking.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,9 +272,14 @@ def action_done(self):
if not self.keep_screen_values or self.todo_line_id.state != "pending":
if not self.env.context.get("skip_clean_values", False):
self.action_clean_values()
keep_vals = {}
else:
keep_vals = self._convert_to_write(self._cache)
self.fill_todo_records()
self.determine_todo_action()
self.action_show_step()
if keep_vals:
self.update_keep_values(keep_vals)
# Force refresh candidate pickings to show green if not pending moves
if not self.pending_move_ids:
self._set_candidate_pickings(self.picking_id)
Expand All @@ -287,6 +292,13 @@ def action_done(self):
self._add_read_log()
return res

def update_keep_values(self, keep_vals):
options = self.option_group_id.option_ids
fields_to_keep = options.filtered(
lambda op: self._fields[op.field_name].type != "float"
).mapped("field_name")
self.update({f_name: keep_vals[f_name] for f_name in fields_to_keep})

def action_manual_entry(self):
result = super().action_manual_entry()
if result:
Expand Down

0 comments on commit 24d9bc1

Please sign in to comment.