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][IMP] stock_move_line_lock_qty_done: prevent test cases from other modules from failing #1760

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from

Conversation

AungKoKoLin1997
Copy link
Contributor

Before this PR, if we had other test cases that updated the done quantity after the transfer was done in our module, they would be blocked by stock_move_line_lock_qty_done. This PR addresses that issue.

@qrtl

@AungKoKoLin1997 AungKoKoLin1997 marked this pull request as draft November 8, 2024 10:39
@AungKoKoLin1997 AungKoKoLin1997 marked this pull request as ready for review November 8, 2024 10:43
@AungKoKoLin1997
Copy link
Contributor Author

I assume the test cases failed from stock_move_line_auto_fill in this PR is not related with the changes because I see the other PR is facing the same issue.

Comment on lines 14 to 17
check_qty_done_change_allowed = (
config["test_enable"]
and self.env.context.get("test_stock_move_line_lock_qty_done")
) or not config["test_enable"]
if not check_qty_done_change_allowed:
return True
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this suffice?

Suggested change
check_qty_done_change_allowed = (
config["test_enable"]
and self.env.context.get("test_stock_move_line_lock_qty_done")
) or not config["test_enable"]
if not check_qty_done_change_allowed:
return True
if config["test_enable"] and not self.env.context.get("test_stock_move_line_lock_qty_done"):
return True

@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 16.0-imp-stock_move_line_lock_qty_done branch from a356ecc to f863bd7 Compare November 12, 2024 02:28
Copy link
Member

@yostashiro yostashiro left a comment

Choose a reason for hiding this comment

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

LGTM.

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

Successfully merging this pull request may close these issues.

2 participants