Skip to content

Conversation

@carlos-lopez-tecnativa
Copy link
Contributor

Continuation of #4751
TT52315
@Tecnativa @pedrobaeza @MiquelRForgeFlow could you please review this?

JOIN product_product p ON sol.product_id = p.id
JOIN product_template pt ON p.product_tmpl_id = pt.id
WHERE pt.type IN ('product', 'consu')
AND (sol.is_delivery IS NULL OR sol.is_delivery = FALSE)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
AND (sol.is_delivery IS NULL OR sol.is_delivery = FALSE)
AND NOT sol.is_delivery

Copy link
Contributor Author

@carlos-lopez-tecnativa carlos-lopez-tecnativa Mar 27, 2025

Choose a reason for hiding this comment

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

This is not working correctly.
With your proposal, the result is:
image

With the current code, the result is:
image

Because you have true, false, null:
image

Copy link
Contributor

@MiquelRForgeFlow MiquelRForgeFlow Mar 27, 2025

Choose a reason for hiding this comment

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

Oh sorry.

FYI Equivalent options:

Suggested change
AND (sol.is_delivery IS NULL OR sol.is_delivery = FALSE)
AND NOT COALESCE(sol.is_delivery, FALSE)
Suggested change
AND (sol.is_delivery IS NULL OR sol.is_delivery = FALSE)
AND sol.is_delivery IS DIFFERENT FROM TRUE
Suggested change
AND (sol.is_delivery IS NULL OR sol.is_delivery = FALSE)
AND (sol.is_delivery IS NULL OR sol.is_delivery = FALSE)

@MiquelRForgeFlow
Copy link
Contributor

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 17.0-ocabot-merge-pr-4885-by-MiquelRForgeFlow-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 343966c into OCA:17.0 Mar 27, 2025
4 checks passed
@OCA-git-bot
Copy link
Contributor

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

@pedrobaeza pedrobaeza deleted the 17.0-mig-delivery branch March 27, 2025 16:49
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.

4 participants