Name: [FIX] stock: avoid O(n²) move-line scan when reserving serial products

State: Succeed finished in 99m

PR State: merged

PR Author: Roy Le

PR Author Email:

PR: #1232

Committer: Roy Le

Committer Email: roy.le@viindoo.com

Commit: 1245c6c00572b89d6dabce6da78753722062464b

Description:

                                            [FIX] stock: avoid O(n²) move-line scan when reserving serial products

_update_reserved_quantity searches for an updatable move line per
reserved quant via `next(l for l in self.move_line_ids if
l._reservation_is_updatable(..))`. This scans the (growing)
move_line_ids for every quant → O(n²) on a move of n serial units. But
stock.move.line._reservation_is_updatable returns False unconditionally
for tracking == 'serial', so the scan can never find a candidate and is
pure waste.
                                            

Branch: 16.0

Instance ID: 0

Age:

Up-time:

Subbuilds Name State Detail
Build 386173 At install tests: from account to website_twitter 78m Succeed Log
Build 386174 Post install tests: step install all modules 29m Succeed Log
Build 386175 Post install tests: from account to payment 54m Succeed Log
Build 386176 Post install tests: from payment_adyen to to_account_payment 69m Succeed Log
Build 386177 Post install tests: from to_account_reports to to_warranty_purchase_stock 39m Succeed Log
Build 386178 Post install tests: from to_warranty_sale to viin_features_activate_hr_recruitment 29m Succeed Log
Build 386179 Post install tests: from viin_features_activate_inter_company to viin_purchase 24m Succeed Log
Build 386180 Post install tests: from viin_purchase_approval to website_twitter 29m Succeed Log
Create Date Level Message
06/19/2026 11:45:33 INFO
Updated repository Viindoo-tvtmaaddons
06/19/2026 11:45:33 INFO
Updated repository Viindoo-erponline-enterprise
06/19/2026 11:45:33 INFO
Updated repository Viindoo-branding
06/19/2026 11:45:33 INFO
Cloned repository Viindoo-odoo