Daily updates from Odoo
Thursday, March 19, 2026
1 change
Resolved issues and error corrections
This update resolves an issue where large bank statement imports could overload the database, leading to performance problems. By preventing unnecessary savepoint creation during the import process, the system now handles imports more efficiently and reliably. This enhances the stability of the Odoo platform when importing large datasets.
Original PR description
## [FIX] account: sequence mixin cache on cr.cache instead of precommit The aim of this commit is to prevent the creation of Savepoint in chain. This is achieved by preventing the `sequence.mixin`…
## [FIX] account: sequence mixin cache on cr.cache instead of precommit The aim of this commit is to prevent the creation of Savepoint in chain. This is achieved by preventing the `sequence.mixin` cache to be cleared as soon as a flush happens and to prevent the `bank.statement.line` creation to clear the cache. ### Context: During an import of document, like a big CSV of bank statement for example, if any issue arises, the ORM rollback to the savepoint of import and retry to import one record at a time and rollback again later on to collect the errors and show the faulting line to the customer. ### Cause: 1) As we flush for every single record, the `precommit.data.cache` gets cleared during the flush and the `sequence.mixin` cache gets wiped out. 2) The creation of bank statement set the name of its move_id to False which results in the `sequence.mixin` code to clear its own cache by itself. [name set to False](https://github.com/odoo/odoo/blob/1361c0bc98c91f1e601b0fc3beaa948df3a3bfcd/addons/account/models/account_bank_statement_line.py#L410-L412) Both (1) and (2) results in the sequence.mixin code to recreate the cache and, for that, to create a new Savepoint. This is done at each iteration of the import loop which could results in this case in 300+ savepoints existing at the same time eating all Postgres shared buffers memory putting the whole production database on its knees. task-id: None (investigated for odoo.com) Forward-Port-Of: odoo/odoo#250827