summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src
diff options
context:
space:
mode:
authorAurélien Warnon <awa@odoo.com>2020-09-10 08:24:35 +0000
committerThibault Delavallée <tde@odoo.com>2020-09-28 10:58:19 +0000
commitb3cc0453eed6eea71296b4e381909798daca9dc0 (patch)
treeeb30efbea467d32ffa4eff740ae18c515c7849c3 /addons/web_editor/static/src
parent31f2bb5e494965d31f5e49d47908fd4b5eb64077 (diff)
[IMP] event_sale: speed up event price_subtotal computation
This commit improves the performance of the 'sale_price_subtotal' field of event.event by refactoring the way it's computed. The previous naive implementation looped on sale.order.lines linked to the event and performed a currency conversion for every single line. This leads up to thousands of requests to fetch the conversion rate and sum up everything on a real production database like Odoo.com . This new implementation groups the amounts by currency and performs a single conversion per currency (factored by the number of events in 'self'). It has the drawback of using 'today' to fetch conversion rates instead of the actual SO date like previous implementation. We (aka: all main POs as this decision was discussed) consider that as an acceptable trade-off to increase performances. Task ID-2335287 closes odoo/odoo#58635 X-original-commit: a4c4b03a09ffc08842f44b5759e3c7298cfbd915 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Diffstat (limited to 'addons/web_editor/static/src')
0 files changed, 0 insertions, 0 deletions