-
- Downloads
[IMP] models: ORM speedup
This branch is the combination of several optimizations in the ORM:
* store field values once in the cache: the cache reflects more
faithfully the database, only fields that explicitly depend on the
context have an extra indirection in the cache;
* delay recomputations by default: use method `recompute` to explicitly
flush out pending recomputations;
* delay updates in method `write`: updates are stored in a data
structure that can be flushed efficiently to the database with method
`flush` (which also flush out recomputations);
* make method `modified` take advantage of inverse fields to inverse
dependencies;
* filter records by evaluating a domain on records in Python;
* a computed field with `readonly=False` behaves like a normal field
with an onchange method;
* computed fields are computed in superuser mode by default.
Work done by Toufik Ben Jaa, Raphael Collet, Denis Ledoux and Fabien
Pinckaers.
closes odoo/odoo#35659
Signed-off-by:
Denis Ledoux <beledouxdenis@users.noreply.github.com>
Showing
- addons/account/models/account.py 8 additions, 6 deletionsaddons/account/models/account.py
- addons/account/models/account_journal_dashboard.py 3 additions, 0 deletionsaddons/account/models/account_journal_dashboard.py
- addons/account/models/account_move.py 113 additions, 104 deletionsaddons/account/models/account_move.py
- addons/account/models/account_payment.py 7 additions, 1 deletionaddons/account/models/account_payment.py
- addons/account/models/account_reconcile_model.py 3 additions, 0 deletionsaddons/account/models/account_reconcile_model.py
- addons/account/models/chart_template.py 5 additions, 1 deletionaddons/account/models/chart_template.py
- addons/account/models/partner.py 10 additions, 0 deletionsaddons/account/models/partner.py
- addons/account/tests/account_test_no_chart.py 6 additions, 0 deletionsaddons/account/tests/account_test_no_chart.py
- addons/account/tests/invoice_test_common.py 2 additions, 2 deletionsaddons/account/tests/invoice_test_common.py
- addons/account/tests/test_account_move_entry.py 3 additions, 0 deletionsaddons/account/tests/test_account_move_entry.py
- addons/account/tests/test_invoice_taxes.py 2 additions, 2 deletionsaddons/account/tests/test_invoice_taxes.py
- addons/account/tests/test_reconciliation.py 36 additions, 24 deletionsaddons/account/tests/test_reconciliation.py
- addons/account/tests/test_reconciliation_matching_rules.py 2 additions, 2 deletionsaddons/account/tests/test_reconciliation_matching_rules.py
- addons/account/wizard/account_invoice_send.py 2 additions, 0 deletionsaddons/account/wizard/account_invoice_send.py
- addons/base_address_extended/models/base_address_extended.py 2 additions, 0 deletionsaddons/base_address_extended/models/base_address_extended.py
- addons/base_automation/data/base_automation_demo.xml 1 addition, 0 deletionsaddons/base_automation/data/base_automation_demo.xml
- addons/base_automation/models/base_automation.py 35 additions, 9 deletionsaddons/base_automation/models/base_automation.py
- addons/base_automation/tests/test_base_automation.py 1 addition, 0 deletionsaddons/base_automation/tests/test_base_automation.py
- addons/base_sparse_field/models/fields.py 7 additions, 4 deletionsaddons/base_sparse_field/models/fields.py
- addons/calendar/data/calendar_demo.xml 2 additions, 2 deletionsaddons/calendar/data/calendar_demo.xml
Loading
Please register or sign in to comment