[18.0][ADD] product_supplierinfo_active_products_performance_filter - #3137
Open
StephaneMangin wants to merge 1 commit into
Open
Conversation
StephaneMangin
force-pushed
the
18.0-product_supplierinfo_active_products_performance_filter-smn
branch
3 times, most recently
from
July 28, 2026 09:53
c6d1695 to
672cc51
Compare
StephaneMangin
force-pushed
the
18.0-product_supplierinfo_active_products_performance_filter-smn
branch
from
July 28, 2026 10:09
672cc51 to
82c55d6
Compare
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.
Summary
Adds a new module
product_supplierinfo_active_products_performance_filterthatfixes a severe performance regression on the Active Products search filter in
Purchase → Configuration → Vendor Pricelists.
Fixes upstream issue: odoo/odoo#106058
Problem
The standard Active Products filter uses the domain:
On databases with millions of products, PostgreSQL cannot satisfy this with an
index on
product.supplierinfo(no localactivecolumn) and falls back to afull-table scan — causing queries that run for more than 10 minutes.
Solution
Denormalizes
product.activeontoproduct.supplierinfoas a stored, indexedboolean field
is_product_active. The filter domain becomes:The field is kept in sync via ORM hooks on
product.templateandproduct.product. Apost_init_hookbackfills existing rows on install usingdirect SQL for performance.