From 492bf981392a2c3a9bc7fdf58cff1f42e6d82120 Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Wed, 19 Mar 2014 23:32:08 +0100 Subject: [PATCH] Add reload menu and reload context to client actions issue3740 review4221002 --- tryton/gui/window/view_form/screen/screen.py | 7 ++++++- tryton/gui/window/wizard.py | 4 +--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/tryton/gui/window/view_form/screen/screen.py b/tryton/gui/window/view_form/screen/screen.py index 6fcb700b26..37a876ec11 100644 --- a/tryton/gui/window/view_form/screen/screen.py +++ b/tryton/gui/window/view_form/screen/screen.py @@ -24,7 +24,7 @@ from tryton.exceptions import TrytonServerError, TrytonServerUnavailable from tryton.jsonrpc import JSONEncoder from tryton.common.domain_parser import DomainParser from tryton.common import RPCExecute, RPCException, MODELACCESS, \ - node_attributes, sur + node_attributes, sur, RPCContextReload from tryton.action import Action import tryton.rpc as rpc @@ -919,6 +919,11 @@ class Screen(SignalEvent): elif action.startswith('switch'): _, view_type = action.split(None, 1) self.switch_view(view_type=view_type) + elif action == 'reload menu': + from tryton.gui import Main + RPCContextReload(Main.get_main().sig_win_menu) + elif action == 'reload context': + RPCContextReload() def get_url(self): query_string = [] diff --git a/tryton/gui/window/wizard.py b/tryton/gui/window/wizard.py index b9fb10658b..72f518c958 100644 --- a/tryton/gui/window/wizard.py +++ b/tryton/gui/window/wizard.py @@ -11,7 +11,7 @@ from tryton.gui import Main from tryton.exceptions import TrytonServerError from tryton.gui.window.nomodal import NoModal from tryton.common.button import Button -from tryton.common import RPCExecute, RPCException, RPCContextReload +from tryton.common import RPCExecute, RPCException from tryton.common import TRYTON_ICON _ = gettext.gettext @@ -125,8 +125,6 @@ class Wizard(object): def end(self, callback=None): RPCExecute('wizard', self.action, 'delete', self.session_id, process_exception=False, callback=callback) - if self.action == 'ir.module.module.config_wizard': - RPCContextReload(Main.get_main().sig_win_menu) def clean(self): for widget in self.widget.get_children():