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

[16.0][FIX] stock_quant_manual_assign: Correct handling of immediate transfers #2038

Merged
merged 1 commit into from
Oct 21, 2024

Conversation

yostashiro
Copy link
Member

This commit fixes the following issues:

  • The previous code does not handle the immediate transfer scenario when auto_fill_qty_done is selected in the operation type. This raises a missing-record error, trying to update qty_done on non-existing move line records.
  • move._do_unreserve() keeps existing stock.move.line records if there is some qty_done set, which is not a desirable outcome. All the linked move line records should be unlinked before selected quants are assigned.

I also took the liberty of refactoring the test code a bit.

@qrtl QT4574

@yostashiro
Copy link
Member Author

This PR supersedes #1908

Copy link
Contributor

@AungKoKoLin1997 AungKoKoLin1997 left a comment

Choose a reason for hiding this comment

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

LGTM (Code and Functional Reviews)

Copy link
Contributor

@kanda999 kanda999 left a comment

Choose a reason for hiding this comment

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

Functioanl and code review.

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

Copy link
Contributor

@rousseldenis rousseldenis left a comment

Choose a reason for hiding this comment

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

Code review. Seems great

Copy link

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Oct 20, 2024
This commit fixes the following issues:

- The previous code does not handle the immediate transfer scenario when
  auto_fill_qty_done is selected in the operation type. This raises a missing-record
  error, trying to update qty_done on non-existing move line records.
- move._do_unreserve() keeps existing stock.move.line records if there is some
  qty_done set, which is not a desirable outcome. All the linked move line records
  should be unlinked before selected quants are assigned.
@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 16.0-fix-stock_quant_manual_assign branch from 0151b24 to c7dc47b Compare October 21, 2024 02:12
@AungKoKoLin1997
Copy link
Contributor

@oca/stock-logistics-warehouse-maintainers
Can we please get this PR merged?

@rousseldenis
Copy link
Contributor

/ocabot merge minor

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 16.0-ocabot-merge-pr-2038-by-rousseldenis-bump-minor, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit cb6937f into OCA:16.0 Oct 21, 2024
7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at b94a8a1. 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
Labels
approved merged 🎉 ready to merge stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants