Monday, April 25, 2016
1 change · master
Enhancements to existing features
This update changes how Odoo prepares related records in advance, making data loading more predictable and easier for developers to control. It should improve consistency and performance across areas such as mail, membership, point of sale, events, and automated actions while reducing internal data handling errors.
Original PR description
New programmer model for the prefetching of records: - each recordset is attached to a **prefetch object**: `records._prefetch` - the prefetch object associates model names to record ids to prefetch: `ids = records._prefetch[model_name]` - a call to `model.browse(ids)` returns a recordset with a new prefetch object - the prefetch object is passed and populated by - iteration - access of relational field - `with_env()`, `sudo()`, `with_context()`