summaryrefslogtreecommitdiff
path: root/doc/reference/javascript_cheatsheet.rst
diff options
context:
space:
mode:
authorGéry Debongnie <ged@odoo.com>2018-04-26 09:38:47 +0200
committerGéry Debongnie <ged@odoo.com>2018-04-26 09:45:06 +0200
commitc5f50c56a91002bf32845a79b98e856936605859 (patch)
tree6366cf2249325af3141f7be64dc103b8fda98ccf /doc/reference/javascript_cheatsheet.rst
parent5666bc3d32104860f77325e407f19e04993ebab7 (diff)
[FIX] web: fix a race condition in web client
Here is an interesting scenario, involving the reconciliation tour again (because it is our only tour that does async stuff before changing url): - web client starts normally - tour reconciliation starts, perform an rpc to find some id - web client fetches users default action, it is empty, so clicks on first menu item to load initial action, which is discuss. this will make the web client load the action with datamanager (it should be the action manager's job!). - reconciliation tour rpc completes, it changes the url, this will do a do_action - the load_action rpc from the web client completes, it will then perform a do_action, which will drop the action initiated by the tour - tour fails. The issue here is that the on_menu_action method from the web client is not really safe, from a concurrency point of view: it performs some asynchronous work, and then unilateraly decides to do a doAction. With this commit, we simply add the do_action request to the action manager, which uses internally a "dropprevious" system. This means that it will always use the last action, just as expected.
Diffstat (limited to 'doc/reference/javascript_cheatsheet.rst')
0 files changed, 0 insertions, 0 deletions