summaryrefslogtreecommitdiff
path: root/doc/_extensions/autojsdoc/parser/parser.py
diff options
context:
space:
mode:
authorSébastien Theys <seb@odoo.com>2019-05-21 09:50:53 +0000
committerSébastien Theys <seb@odoo.com>2019-05-21 10:11:38 +0000
commit51ef8514eaddaebbdfee73230cfe955735d02f67 (patch)
tree7bd77f5d645ce2ae6466e0f9312ebcf233805b0d /doc/_extensions/autojsdoc/parser/parser.py
parent42cc64b5cee743ad5a817d757a772eebbcc8927c (diff)
[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>
Diffstat (limited to 'doc/_extensions/autojsdoc/parser/parser.py')
0 files changed, 0 insertions, 0 deletions