Add reload menu and reload context to client actions
issue3740 review4221002
This commit is contained in:
1 parent
086b4ae1ae
commit
492bf98139
2 files changed
+7
-4
No files matched your search
@@ -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 = []
|
||||
|
||||
@@ -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():
|
||||
|
||||
Reference in new issue
Block a user