[IMP] shopfloor_reception: lot expiration date#1072
Closed
[IMP] shopfloor_reception: lot expiration date#1072
Conversation
Contributor
|
Hi @sebalix, @guewen, @mmequignon, @JuMiSanAr, @simahawk, |
48adfe3 to
6b9bcc6
Compare
rousseldenis
approved these changes
Jul 2, 2025
ac1ce5c to
4658146
Compare
6893b49 to
94ea20f
Compare
27 tasks
3e09f70 to
b33c9de
Compare
e403d4f to
392f910
Compare
Contributor
|
@sbejaoui Can you drop generated files? And the drop the test-requirement |
9defbb9 to
5e625df
Compare
nicolas-delbovier-acsone
suggested changes
Feb 17, 2026
nicolas-delbovier-acsone
left a comment
There was a problem hiding this comment.
Please have a look at this rework where I try to reduce the number of API calls and simplify the code: #1128
…expiration date If we use the GS1 shopfloor extension, we need to get the expiration date from lot barcode is supplied in it.
In Odoo, as soon as lot_name field and expiration_date one are filled in, lot will be created from those values if it does not exists. We should inform user that the line is ready and has all the information in that case.
As in Odoo backend, lot name could have been set to generate the lot with the expiration date at move line validation. We need it to get the information the lot is ready on user side
…ng from move line
…piraton date The set_lot method is quite complex and had multi purpose. It's called multiple times by the JS code to fill the lot name and the expiration date. Each call is independent and the method must handle all the cases. That's mean the method must take care of the previous values provided by the user at each call and ensure that the couple lot name/expiration date is valid. Before this change, if a first call was done with a lot name, an existing lot or a new one was linked to the move line. Then if a second call was done with an expiration date, the method updated the existing lot with the new expiration date. This could lead to inconsistencies if an existing lot already linked to quant packages was updated with a different expiration date. In addition, if the user changed the lot name on a new call, a new lot was created even if the previous created lot was not used. To void these issues, the implementation has been changed to never created or update an existing lot and detect which parameter has explicitly been provided by the user. In any case, the couple lot name/expiration are checked to ensure they are consistent. We detect if an existing lot could conflict with the provided values. At the same time, at first call, if a lot is found for the provided lot name and/or expiration date, we fill the missing value to help the user. As result, a main change is that the lot is now created when the line is validated.
Ensures that the value entered into the UI is properly converted into UTC according to the warehouse timezone
…to event emission. The `on_date_picker_selected` handler was being triggered during the component's mounting/update lifecycle even when no user interaction occurred. In scenarios where a product uses lots but not expiration dates, this caused a second 'set_lot' call with undefined parameters (when entering the lot name), leading to a 500 error on the server.
68b972a to
63c4174
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on: