Daily updates from Odoo
Monday, August 4, 2025
1 change
Resolved issues and error corrections
The point of sale settlement process now loads only invoices linked to the selected POS configuration, instead of trying to load every invoice in the system. This prevents memory failures in large databases and keeps POS operations more reliable.
Original PR description
Issue: - The `_load_pos_data` method was fetching all `account.move` records instead of only those related to the POS orders of the selected configuration. - This caused MemoryError Cause: - The [_load_pos_data](https://github.com/odoo/enterprise/blob/saas-18.3/pos_settle_due/models/account_move.py#L18-L20) method used an empty domain (`[]`) because the `_load_pos_data_domain` method was not properly implemented. - As a result, `search_read` fetched all available `account.move` records in the system, regardless of the POS config context. Fix: - This commit implements `_load_pos_data_domain` to: - Retrieve only POS orders for the current config with linked invoices. - Extract their related `account.move` IDs. - Return a domain to limit the search to only those move IDs. ``` rari_3017353=> select count(*) from account_move; count --------- 1607249 (1 row) ``` task-4920625