Skip to content

Syncing from upstream OCA/product-attribute (18.0) - #1613

Merged
bt-admin merged 3 commits into
brain-tec:18.0from
OCA:18.0
Jun 24, 2026
Merged

Syncing from upstream OCA/product-attribute (18.0)#1613
bt-admin merged 3 commits into
brain-tec:18.0from
OCA:18.0

Conversation

@bt-admin

Copy link
Copy Markdown

bt_gitbot

CarlosRoca13 and others added 3 commits June 23, 2026 11:55
The price column recomputed the pricelist price one product at a time (``_get_product_price`` per report row), which made the native ``_get_applicable_rules`` rule search run once per product. On large pricelists this dominated the report render time.

Precompute every price in a single batched ``_get_products_price`` call and inject the result in the context as ``product_prices`` so ``_compute_product_price`` reads it instead of recomputing. This collapses the per-product rule searches of the printed pricelist into a single one, both for the PDF report and the xlsx export, without changing the price values nor the public method signatures.
Signed-off-by pedrobaeza
@bt-admin bt-admin added the 18.0 label Jun 24, 2026
@bt-admin
bt-admin merged commit d372f60 into brain-tec:18.0 Jun 24, 2026
4 checks passed
@codecov

codecov Bot commented Jun 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 60.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.86%. Comparing base (b8d1bb0) to head (1e006e2).
⚠️ Report is 181 commits behind head on 18.0.

Files with missing lines Patch % Lines
...st_direct_print/wizards/product_pricelist_print.py 55.55% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             18.0    #1613      +/-   ##
==========================================
- Coverage   92.89%   92.86%   -0.04%     
==========================================
  Files         575      575              
  Lines        9042     9051       +9     
  Branches      754      756       +2     
==========================================
+ Hits         8400     8405       +5     
- Misses        451      453       +2     
- Partials      191      193       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants