summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/models/thread_cache
diff options
context:
space:
mode:
authorIvan Yelizariev <iel@odoo.com>2021-01-25 12:24:14 +0000
committerRaphael Collet <rco@odoo.com>2021-01-25 17:40:19 +0000
commitb118cb62ed1905ca52e4920315ffadf9db7d7d06 (patch)
tree5a3a9c64d33b5e6923c176bf473a10c8ad82b7f7 /addons/mail/static/src/models/thread_cache
parent7368cbfcb477aaf156c1c5ad93c717720e048a23 (diff)
[FIX] product, sale, stock: speed up discarding product variants
Modifying product attributes involves discarding product variants via the method _unlink_or_archive(), which tries to delete variants, and archive the ones for which the deletion fails. This process is very slow when most product variants must be archived. Instead, we filter out the variants that must be archived anyway (like the ones used in sales or stock), in order to avoid the variants that cannot be deleted. On a product with ~200 variants, the time goes from more than 15 minutes (the request times out) to around 5 seconds! opw-2440417 closes odoo/odoo#65024 X-original-commit: 63b2f85079404eafac918a74c95e27051539c133 Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Diffstat (limited to 'addons/mail/static/src/models/thread_cache')
0 files changed, 0 insertions, 0 deletions