Skip to content

Conversation

@florentx
Copy link
Member

@florentx florentx commented Nov 7, 2025

  • Simplify signature ofModel.search: arguments order, limit and offset become keyword-only, and undocumented argument reverse is abandoned.

  • New: Model.search returns a RecordList which is lazily evaluated. API method is called only when needed: if attributes are read or methods are called. It will use search_read API method when it's adequate.

  • New: extracting a part of a lazy RecordList will not call API method, for simple use cases like env['account.move'].search([])[10:90]. It will set offset and limit on the prepared search instead.

  • Remove undocumentedEnv._web.

  • Refactor code for read field formatter.

  • Refactor Record and RecordList constructors: get rid of __new__ and simplify.

  • Add private method Record._invalidate_cache to implement Record.refresh.

@florentx florentx merged commit b8d5ccf into master Nov 11, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants