Skip to content

Commit

Permalink
[FIX] web: restore state session action dispatching at loadState
Browse files Browse the repository at this point in the history
e935099 restored the /apps/<app> controller and introduced  a test.

Despite the test still working, the feature was broken at higher level with
19eacf7 refactoring.
Indeed, loadState was not called anymore even if state.sa existed.

Enterprise counterpart odoo/enterprise#5974

closes #38206

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
  • Loading branch information
rdeodoo committed Oct 8, 2019
1 parent 1bb12ef commit 0bc44af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/web/static/src/js/chrome/web_client.js
Expand Up @@ -141,7 +141,7 @@ return AbstractWebClient.extend({
var stringstate = $.bbq.getState(false); var stringstate = $.bbq.getState(false);
if (!_.isEqual(self._current_state, stringstate)) { if (!_.isEqual(self._current_state, stringstate)) {
var state = $.bbq.getState(true); var state = $.bbq.getState(true);
if (state.action || (state.model && (state.view_type || state.id))) { if (state.sa || state.action || (state.model && (state.view_type || state.id))) {
return self.action_manager.loadState(state, !!self._current_state).then(function () { return self.action_manager.loadState(state, !!self._current_state).then(function () {
if (state.menu_id) { if (state.menu_id) {
if (state.menu_id !== self.menu.current_primary_menu) { if (state.menu_id !== self.menu.current_primary_menu) {
Expand Down

0 comments on commit 0bc44af

Please sign in to comment.