Adrian Torres c8d5ff55ff [FIX] sale_coupon: restore SO processing time
This optimizes the confirmation of a sale_order in the ecommerce by ~73%,
for a cart with 160 unique items, the processing time goes from
7m46s to 39s, which is roughly the same amount of processing time if the
module `sale_coupon` is not installed.

This optimization is achieved in two steps:

1. By validating promotional/discounted products in batch instead of
validating each product one at a time.

2. By performing an unlink() on invalid reward lines instead of sending
a delete command by writing to the one2many, as delete commands are not
(yet) performed in batch, which means record recomputation after every
delete.

opw-1893277

closes odoo/enterprise#2905
2018-10-23 06:57:50 +00:00
2017-04-28 09:07:28 +02:00
S
Description
No description provided
LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%