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

[15.0][FIX] repair_stock_move: proper main lot management & default location for remove operations #58

Open
wants to merge 2 commits into
base: 15.0
Choose a base branch
from

Conversation

dalonsod
Copy link

Two fixes added with this PR:

(1) Proper main lot management:
When product to be repaired has tracking two different issues could be raised:

  • If a repair line hasn't lot filled (because e.g. product has no tracking), lot/serial for repaired product is used for lines reservation and an error is raised, due to incompatibility with the line product, when this product is untracked.
  • When creating stock move reservation for repaired product, move line is properly created, but sometimes stock quant is incorrectly updated, e.g. if there's an older lot available, because the lot was not properly marked during reservation process.

This commit fixes both issues and fixes #39

(2) Default repair line source location for remove operations:
With this fix, for "remove" repair lines repair location is not used as default source location, that is preserved for "add" operations.


@AaronHForgeFlow @DavidJForgeFlow could you review? If needed, I'd split this in two different PRs.

When product to be repaired has tracking two different issues could be
raised:
* If a repair line hasn't lot filled (because e.g. product has no
  tracking), lot/serial for repaired product is used for lines
  reservation and an error is raised, due to incompatibility with the
  line product, when this product is untracked.
* When creating stock move reservation for repaired product, move line
  is properly created, but sometimes stock quant is incorrectly updated,
  e.ge. if there's an older lot available, because the lot was not
  properly marked during reservation process.

This commit fixes both issues
@AaronHForgeFlow
Copy link
Contributor

Overall LG

…ve operations

With this fix, for "remove" repair lines repair location is not used as
default source location, that is preserved for "add" operations
@dalonsod dalonsod force-pushed the 15.0-fix-repair_stock_move-mainlot branch from a300830 to 03431f6 Compare September 26, 2024 07:04
Copy link
Contributor

@AaronHForgeFlow AaronHForgeFlow 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 LGTM

Copy link
Contributor

@DavidJForgeFlow DavidJForgeFlow left a comment

Choose a reason for hiding this comment

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

LGTM!

@dalonsod
Copy link
Author

@LoisRForgeFlow is this ready to be merged? When done, I'll check if this should be ported to v16 as well

@DavidJForgeFlow
Copy link
Contributor

@rousseldenis

Copy link

@LoisRForgeFlow LoisRForgeFlow left a comment

Choose a reason for hiding this comment

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

Thanks @dalonsod LGTM, just a suggestion: do you think you could add a small test case for avoiding future regressions?

@dalonsod
Copy link
Author

@LoisRForgeFlow OK, I'll add some tests when possible

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

Successfully merging this pull request may close these issues.

[15.0] repair_stock_move: stock quant inconsistent when lots are reserved
5 participants