[PERF] point_of_sale: invoicing an order asks the pricelist for a percentage rule
Succeed
358m
open
Commit message
[PERF] point_of_sale: invoicing an order asks the pricelist for a percentage rule
_prepare_invoice_lines read order.pricelist_id.item_ids to know whether the pricelist has a percentage
rule. Reading item_ids applies the field's domain on the products' active flag ("product_tmpl_id IN
(SELECT id FROM product_template WHERE active ...)", the same for the variants) to every rule of the
pricelist, and PostgreSQL scans those subqueries once per rule when the active products do not fit in
work_mem: 47 s for each invoice of a point of sale order on a pricelist of 3,597 rules with 160,000
products (0.8 s with a hashed subplan at work_mem 16 MB). df008ba5523f avoided the same read when loading
the POS data.
The question is now asked of the rules once per order: a count, limited to one, of the pricelist's
percentage rules under the same domain. PostgreSQL filters on compute_price (indexed) first and runs the
product subqueries only for the percentage rules: 0.6 ms on that pricelist, which has none. Same answer
as before; it was also recomputed for every line of the order.
Subbuilds
10
10
- #446468 At install tests: account_peppol_response → website_timesheet 46m Succeed Log
- #446470 Post install tests: account → l10n_vn_viin_account_auto_transfer 2h 35m Succeed Log
- #446471 Post install tests: l10n_vn_viin_account_reports → phone_validation 2h 31m Succeed Log
- #446472 Post install tests: point_of_sale → rpc 2h 47m Succeed Log
- #446473 Post install tests: sale → to_account_accountant 2h 47m Succeed Log
- #446474 Post install tests: to_account_asset → to_vendor_price_lock 2h 52m Succeed Log
- #446475 Post install tests: to_wallet → viin_crm_sankey 2h 48m Succeed Log
- #446476 Post install tests: viin_customizer → viin_google_drive_sale 2h 48m Succeed Log
- #446477 Post install tests: viin_helpdesk → viin_quality_helpdesk 2h 55m Succeed Log
- #446478 Post install tests: viin_quality_project → website_timesheet 2h 59m Succeed Log
Build Log
| Date | Level | Message |
|---|---|---|
| 12/04/2026 03:01:38 PM | INFO | Running on build host office2, the most idle machine, build containers taken: office2 10/12, the master 61/36, office1 25/12
|
| 12/04/2026 03:01:38 PM | INFO | Updated repository Viindoo-tvtmaaddons
|
| 12/04/2026 03:01:38 PM | INFO | Updated repository Viindoo-erponline-enterprise
|
| 12/04/2026 03:01:38 PM | INFO | Updated repository Viindoo-branding
|
| 12/04/2026 03:01:38 PM | INFO | Cloned repository Viindoo-odoo
|
| 12/04/2026 03:01:38 PM | INFO | At install tests: this pull request changes no frontend file, so it runs without /web:WebSuite.test_unit_desktop, /web:WebSuite.test_hoot, /web:WebSuite.test_qunit_desktop, /web:MobileWebSuite.test_unit_mobile, /im_livechat:ExternalTestSuite.test_external_livechat
|
| 12/04/2026 03:01:38 PM | INFO | At install tests: this pull request changes nothing installed before point_of_sale, so it runs without the at install tests of the 504 modules installed before it
|
| 12/04/2026 03:01:38 PM | INFO | Post install tests: this pull request changes no frontend file, so it runs without /web:WebSuite.test_unit_desktop, /web:WebSuite.test_hoot, /web:WebSuite.test_qunit_desktop, /web:MobileWebSuite.test_unit_mobile, /im_livechat:ExternalTestSuite.test_external_livechat
|
| 12/04/2026 03:01:38 PM | INFO | Post install tests: 9 parallel builds balanced by the test time measured on 19.0, the longest about 171 minutes of tests
|
| 12/04/2026 03:24:15 PM | INFO | Post install tests: no parallel build added, 3 builds wait to start
|