[FIX] stock: index error in stock_move while split_lines is empty
An IndexError `list index out of range` trace back that occurs in stock/ stock_move : _onchange_move_line_ids was caught by sentry. because split_lines list is empty when user enter blank entry in value. So hear we check the split_lines is empty or not. sentry - 3942491608 closes odoo/odoo#113808 X-original-commit: 7e22d16681a68e15ba66bb2c81cd36ad19f6abff Signed-off-by: Adrien Widart <awt@odoo.com>
This commit is contained in:
committed by
Achraf
parent
09c2b5cdbd
commit
bf4cdcaef3
@@ -1094,7 +1094,7 @@ Please change the quantity done or the rounding precision of your unit of measur
|
||||
if breaking_char in (move_line.lot_name or ''):
|
||||
split_lines = move_line.lot_name.split(breaking_char)
|
||||
split_lines = list(filter(None, split_lines))
|
||||
move_line.lot_name = split_lines[0]
|
||||
move_line.lot_name = split_lines[0] if split_lines else ''
|
||||
move_lines_commands = self._generate_serial_move_line_commands(
|
||||
split_lines[1:],
|
||||
origin_move_line=move_line,
|
||||
|
||||
Reference in New Issue
Block a user