summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/fields/relational_fields.js
diff options
context:
space:
mode:
authorHugo Adan <hugo@vauxoo.com>2019-02-14 02:57:48 +0000
committerMoisés López <moylop260@vauxoo.com>2019-02-17 10:28:21 +0000
commitef618df9e91f8d40411841cf452dd084672cd804 (patch)
tree533d719ccc1ad50beac381db11728f9ba764a480 /addons/web/static/src/js/fields/relational_fields.js
parentce93a949a73f9f17cf1a6ef2b12597c5d2519010 (diff)
[REF] account: Performance improve unreconcile process (_reverse_move):
_reverse_move presents a critical performance issue when unreconcile moves with a lot of account_move_line. The issue is that `account.move` and `account.move.line` models are triggering computed fields/methods for each new `account.move.line` added, computing all lines again and again. Making a factorial performance issue. For each line the function try create cash basis entries for tax/base lines and this is combined with all the fields compute that exists on the model so this introduce a performance problem The issue is that `account.move` and `account.move.line` models are triggering computed fields/methods for each new `account.move.line` created isolated, computing all lines again and again. e.g. _compute_matched_percentage at https://github.com/odoo/odoo/blob/5e8289cfeaf52a1eac64bcc975b186f0b5f9594b/addons/account/models/account_move.py#L44-L62 Then for each line modified/created this compute is executed for all lines (not just the last one). Now by using self.env.norecompute() and self.recompute() the problem was reduced. Unreconciling an 'account.move' with 1576 lines with a payment takes almost 4 minutes when before this changes, the conciliation process seemed not to never end. Fix https://github.com/odoo/odoo/issues/30934 closes odoo/odoo#31014
Diffstat (limited to 'addons/web/static/src/js/fields/relational_fields.js')
0 files changed, 0 insertions, 0 deletions