Do not launch preference actions when reload menu and context
Such reload can happen when the user is already logged in but those actions should only run at login. issue7260 review40231002
This commit is contained in:
1 parent
4bb500a931
commit
0abda1bfd1
2 files changed
+13
-4
No files matched your search
@@ -432,6 +432,14 @@ var Sao = {};
|
||||
};
|
||||
|
||||
Sao.menu = function(preferences) {
|
||||
if (!preferences) {
|
||||
var session = Sao.Session.current_session;
|
||||
Sao.rpc({
|
||||
'method': 'model.res.user.get_preferences',
|
||||
'params': [false, {}],
|
||||
}, session).then(Sao.menu);
|
||||
return;
|
||||
}
|
||||
var decoder = new Sao.PYSON.Decoder();
|
||||
var action = decoder.decode(preferences.pyson_menu);
|
||||
var view_ids = false;
|
||||
|
||||
+5
-4
@@ -1696,11 +1696,12 @@
|
||||
this.search_filter();
|
||||
}
|
||||
} else if (action == 'reload menu') {
|
||||
Sao.get_preferences().then(function(preferences) {
|
||||
Sao.menu(preferences);
|
||||
});
|
||||
Sao.Session.current_session.reload_context()
|
||||
.then(function() {
|
||||
Sao.menu();
|
||||
});
|
||||
} else if (action == 'reload context') {
|
||||
Sao.get_preferences();
|
||||
Sao.Session.current_session.reload_context();
|
||||
}
|
||||
},
|
||||
save_tree_state: function(store) {
|
||||
|
||||
Reference in new issue
Block a user