Odoo Idiosyncrasies#
This is a collection of notes about Odoo, its ORM and „framework“.
The idea is to have a collection of data that I can come back to later, so please forgive the absence of structure.
active_test
in BaseModel.search_read
#
Some times I read active_test
, but could never find its usage.
Here it is. Very Odoo like (from BaseModel.search_read):
# read() ignores active_test, but it would forward it to any downstream search call
# (e.g. for x2m or function fields), and this is not the desired behavior, the flag
# was presumably only meant for the main search().
# TODO: Move this to read() directly?
if 'active_test' in self._context:
context = dict(self._context)
del context['active_test']
records = records.with_context(context)
GitLab EXPKEYSIG
TIL: odoo scaffold