Sébastien Theys 51ef8514ea [FIX] product,sale,website_sale: compute combination possible in rpc
This has several advantages:
- make the code easier to maintain by having the logic only on the python model
- prevent price flickering when changing from/to an impossible combination
- fix the UI for the issue mentioned in the previous commit/the opw
- make the code much faster when using many combinations, by not requiring to
browse and to return every existing and every archived variants

The opportunity is also taken to properly throttle the rpc and to use
"DropMisordered" on its result:
- fix all the other remaining flickering when changing quantity or combination
- fix the server being spammed of rpc when using the configurator modal, but
also in a lot of other cases such as incrementing the quantity, ...
- fix UI consistency by ensuring the result of the last rpc is always the one
displayed, obsolete rpc returns are ignored

By computing the possibility of the combination asynchronously, the two
drawbacks are:
- the UI is a bit less reactive than in the previously the best case scenario,
but this almost completely mitigated by debouncing with a leading call
- it is possible for a quick user to click on "add to cart" on an impossible
combination before the return of the rpc, but this is not really an issue
because when the product will be added to cart there will a check and the
closest possible combination will be selected automatically instead

Finally the event of the configurator mixin and the widgets using it have been
cleaned to avoid the duplication of the rpc in the first place.

opw-1959317
PR: #32691

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-05-21 10:11:38 +00:00
2015-09-08 15:45:09 +02:00
2018-10-09 13:44:38 +00:00
2015-09-08 17:58:38 +02:00
2019-03-13 15:10:02 +00:00

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, Purchase Management, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

Then follow the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%