-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] stock: assign SN on move Lines
Before this commit, we can't use the Generate and Assign Serial Numbers on already existing move line. It always creates new one, even if the picking type use "Pre-fill Detailed Operations". Now, it will edit existing lines, except if we ask to generate more SN than we have unassigned move lines, or if the picking don't use the "Pre-fill Detailed Operations" option, in which cases it will still create new move line with the generated SN. Also, before this commit, paste a list of serial numbers to assign them on multiple move lines in once work only with creation of a new move line for each serial number. Now, it's also work with existing move lines. Finally, some code shared the same logic in `stock.move` in the move line onchange method and in the `_generate_serial_numbers` method. Moves this code in a new method, `_generate_serial_move_line_commands`, and call it in the two previous methods. task-2150561 closes odoo#42316 Signed-off-by: Simon Lejeune (sle) <[email protected]>
- Loading branch information
Showing
3 changed files
with
107 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters