Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PORT] product_lot_sequence: #1323 from 15.0 #1559

Merged
merged 2 commits into from
May 6, 2024

Conversation

vvrossem
Copy link
Contributor

cf. #1323

When opening the detailed operations view of a stock move, Odoo is calling
stock.production.lot._get_next_serial to set stock.move.next_serial field
anytime the product is tracked by serial and the move is assigned.

If we use this module with product or global policy, the respective sequence
will therefore be called and incremented anytime this view is open, even
if the picking is not creating lots (e.g. delivery orders or internal transfers)

To avoid incrementing the sequence unnecessarily, we only allow to get the next
sequence number the first time this view is opened and if the move has
to create new serial numbers.
Otherwise, we force the value to be set to stock.move.next_serial field to
an empty string if no serial has to be created through this move, or to the
next_serial value assigned on the first opening of the view.
@vvrossem vvrossem force-pushed the oca-port-from-15.0-to-16.0-pr-1323 branch 2 times, most recently from 3b43b2c to 77f3821 Compare March 20, 2024 15:15
@vvrossem
Copy link
Contributor Author

@grindtildeath would you mind reviewing this PR? 🙏

Copy link

@yankinmax yankinmax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

Copy link
Contributor

@SilvioC2C SilvioC2C left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall, non-blocking comment

product_lot_sequence/models/stock_move.py Outdated Show resolved Hide resolved
@vvrossem vvrossem force-pushed the oca-port-from-15.0-to-16.0-pr-1323 branch from 77f3821 to 8d070b3 Compare March 21, 2024 10:05
@grindtildeath
Copy link
Contributor

ping @OCA/product-maintainers

@gurneyalex

This comment was marked as resolved.

@dreispt
Copy link
Member

dreispt commented Mar 22, 2024

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 16.0-ocabot-merge-pr-1559-by-dreispt-bump-patch, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Mar 22, 2024
Signed-off-by dreispt
@paulius-sladkevicius
Copy link
Contributor

@dreispt looks like a merge stuck.

@dreispt
Copy link
Member

dreispt commented May 6, 2024

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 16.0-ocabot-merge-pr-1559-by-dreispt-bump-patch, awaiting test results.

@paulius-sladkevicius
Copy link
Contributor

@dreispt wondering if that will do a trick as https://github.com/OCA/product-attribute/pull/1559/checks?check_run_id=22995777385 is still stuck :-)

@OCA-git-bot OCA-git-bot merged commit e431fca into OCA:16.0 May 6, 2024
7 of 9 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at d3e080f. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants