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

fix: show variants in subcontracted PO #46711

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

mihir-kandoi
Copy link
Contributor

Reference support ticket 34443

In a subcontracted PO, variant items were not shown. This fixes that.
I have replaced simple filters with a whitelisted server query as I needed to use SQL

@github-actions github-actions bot added the needs-tests This PR needs automated unit-tests. label Mar 25, 2025
& (table.is_stock_item == 1)
& (table.has_variants == 0)
& (
Case()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since variant items do not have their default_bom field set, using Case function I am checking if item is variant or not. If not variant, check if default_bom field is not null. If variant, fetch template item and check that template's default_bom field instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-tests This PR needs automated unit-tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant