Syncing from upstream OCA/e-commerce (17.0)#918
Merged
Conversation
Avoid replacing `website_ids` from the `website_id` inverse. In this addon, `website_ids` is the source of truth and `website_id` is kept as a computed compatibility field containing the first assigned website. The previous inverse replaced the full `website_ids` relation with the single `website_id` value. This could silently drop website assignments when editing `website_ids` or when legacy code wrote directly on `website_id`. Make the inverse non-destructive by adding the written `website_id` to `website_ids` instead of replacing the whole relation. TT61624
Use `sale_product_domain()` when checking whether a public category has products. This computation controls the visibility of categories in the e-commerce navigation, so it should rely on the same product availability domain used by the shop. Calling `website.website_domain()` directly only applies the generic website filter. This bypasses customizations done on `sale_product_domain()` and may mark a category as empty even when it contains products that are actually available in the current shop. Using `sale_product_domain()` keeps category visibility aligned with the shop product search. TT62516
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 17.0 #918 +/- ##
==========================================
+ Coverage 90.09% 90.16% +0.06%
==========================================
Files 177 177
Lines 1847 1860 +13
Branches 146 147 +1
==========================================
+ Hits 1664 1677 +13
Misses 145 145
Partials 38 38 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
bt_gitbot