Friday, May 15, 2026
1 change · saas-18.2
Resolved issues and error corrections
A cleanup process could mistakenly delete an important Point of Sale numbering sequence, causing POS operations to stop working until manually repaired. This fix ensures the cleanup only removes the intended session-related sequences, keeping POS available and reducing unexpected downtime.
Original PR description
The `_gc_session_sequences` method searches for sequences using Odoo's `=like` operator, which maps to SQL LIKE where `_` is a single-character wildcard. The prefix `pos.order_` (added by `pos_self_order`) therefore matched the `pos.order.line` sequence, which has no integer suffix and was never added to `keep_codes`, causing the autovacuum to delete it silently. This made POS unusable until the sequence was recreated manually. Fix by filtering the search results with `str.startswith` to retain only sequences whose code literally begins with the prefix, discarding any false positives introduced by the SQL wildcard. opw-6215331 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#264322