diff options
| author | Géry Debongnie <ged@odoo.com> | 2018-04-11 17:26:27 +0200 |
|---|---|---|
| committer | Géry Debongnie <ged@odoo.com> | 2018-04-12 11:25:31 +0200 |
| commit | d5f6d1eb4af5261fa6e273dca6f1f013998e9c77 (patch) | |
| tree | 9226295f5599764557e78303367e1f4d57f34f4b /addons/web/static/src/js/chrome/action_manager.js | |
| parent | 6527b69ee0688a72988e5f2d77311fab124a3113 (diff) | |
[FIX] web: prevent race condition with client actions
Here is the issue that initiated this work: the bank reconciliation tour
sometimes failed in community. The reason was that the discuss client
action seemed to be loaded after the tour started, and interfered with
the second step of the tour.
What happened exactly was the following:
- web client is loaded
- initial action is starting (but not complete) (this is discuss)
- tour manager is loaded and starts the reconciliation tour
- the reconciliation tour changes the url to trigger an hash change
- the web client calls loadState on the action manager
- the action manager perform a doAction with the tour url
- the discuss client action is now ready, and replace the reconciliation
action
- the tour is broken.
The underlying cause is really a generic problem: the action manager
does not add the client action starting process in its 'dropprevious'
concurrency primitive. This is probably not really an issue for the
act_window actions, since they have custom loading code that make sure
the loading process is put in the drop previous, but it is definitely a
problem for all client actions.
The solution is quite simple, and should also protect the act window
renderers: put the action controller in the drop previous
Diffstat (limited to 'addons/web/static/src/js/chrome/action_manager.js')
| -rw-r--r-- | addons/web/static/src/js/chrome/action_manager.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/js/chrome/action_manager.js b/addons/web/static/src/js/chrome/action_manager.js index b8d66bed42d..e1c0ddd3e8e 100644 --- a/addons/web/static/src/js/chrome/action_manager.js +++ b/addons/web/static/src/js/chrome/action_manager.js @@ -337,7 +337,7 @@ var ActionManager = Widget.extend({ // communicate its status widget.set_cp_bus(self.controlPanel.get_bus()); } - return self._startController(controller); + return self.dp.add(self._startController(controller)); }) .then(function (controller) { if (self.currentDialogController) { |
