instance.web.client_actions.add("reload", "instance.web.Reload");
/**
+ * Client action to refresh the session context (making sure
+ * HTTP requests will have the right one) then reload the
+ * whole interface.
+ */
+instance.web.ReloadContext = function(parent, action) {
+ // side-effect of get_session_info is to refresh the session context
+ instance.session.rpc("/web/session/get_session_info", {}).then(function() {
+ instance.web.Reload(parent, action);
+ });
+}
+instance.web.client_actions.add("reload_context", "instance.web.ReloadContext");
+
+/**
* Client action to go back in breadcrumb history.
* If can't go back in history stack, will go back to home.
*/
if id in self._uid_cache[db]:
del self._uid_cache[db][id]
self.context_get.clear_cache(self)
- if request:
- if uid in ids and 'lang' in values:
- request.session.get_context()
- request.session.modified = True
return res
def unlink(self, cr, uid, ids, context=None):
def preference_save(self, cr, uid, ids, context=None):
return {
'type': 'ir.actions.client',
- 'tag': 'reload',
+ 'tag': 'reload_context',
}
def preference_change_password(self, cr, uid, ids, context=None):