diff options
| author | Sébastien Theys <seb@odoo.com> | 2020-02-25 12:45:11 +0000 |
|---|---|---|
| committer | Sébastien Theys <seb@odoo.com> | 2020-02-25 13:46:10 +0000 |
| commit | 6bb0963b6adb588925be9789e9b380eb437a13d2 (patch) | |
| tree | a9a345ffda88f5752fec9e2d8cdce85183c7cc86 /addons/web/static/src/js/views/basic/basic_controller.js | |
| parent | 93f10cb6291d3855353e36771e06c08d04b4464f (diff) | |
[IMP] core: optimize read() by avoiding useless query
When the `select` returns nothing more than ids that are already known, there is
no need to make it at all.
This removes one query from `_read` every time it has to fetch only fields that
are stored in a different table (o2m, ...), which happens all the time when
reading a stored field first (triggering prefetch) and then reading a o2m.
The query that is now removed was used to check access rules, but the trick is
to use `check_access_rule` to verify the rules in python instead.
Part of task-2061122
closes odoo/odoo#36263
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
0 files changed, 0 insertions, 0 deletions
