Friday, August 21, 2026
1 change · 18.0
Enhancements to existing features
The website cleanup job now processes old inactive visitors in smaller, controlled batches instead of loading every record at once. This reduces memory usage and helps scheduled maintenance continue smoothly on large databases.
Original PR description
**Description of the issue/feature this PR addresses:** `_cron_unlink_old_visitors()` retrieves all inactive visitor IDs before splitting them into batches. Consequently, `batch_size` only limits the unlink operations, while the initial query and Python list remain unbounded. **Current behavior before PR:** All inactive visitor IDs are loaded into memory during a single cron execution. **Desired behavior after PR is merged:** The initial search is limited to `batch_size` by default. After deleting the batch, the cron reports the actual number of remaining visitors so the Odoo 18 progress mechanism can continue processing them. This is a backport of #197781 to Odoo 18. @Tecnativa @pedrobaeza please review --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr