Skip to content

Commit

Permalink
[FIX] Keep original id
Browse files Browse the repository at this point in the history
  • Loading branch information
bosd committed Sep 23, 2023
1 parent 7a88b45 commit 4f9b3ed
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions stock_picking_line_sequence/models/stock.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,10 @@ def _reset_sequence(self):
for rec in self:
current_sequence = 1
for line in rec.move_ids_without_package:
line.sequence = current_sequence
current_sequence += 1
# Check if the record ID is an integer (real ID) or a string (virtual ID)
if isinstance(line.id, int):
line.sequence = current_sequence
current_sequence += 1

def copy(self, default=None):
return super(StockPicking, self.with_context(keep_line_sequence=True)).copy(
Expand Down

0 comments on commit 4f9b3ed

Please sign in to comment.