openerp-community-reviewer team mailing list archive
-
openerp-community-reviewer team
-
Mailing list archive
-
Message #05178
Re: [Merge] lp:~sylvain-legal/web-addons/7.0-web_easy_switch_company into lp:web-addons
Review: Needs Fixing code review
Hi,
there is a client action for reloading the application (called after the installation of a module for instance).
Asking a reload from the server can be done by returning:
return {
'type': 'ir.actions.client',
'tag': 'reload',
'params': {
'menu_id': menu_id
},
}
I'm not sure, but I think you can call it from javascript with
self.do_action('reload');
You can inspect the client action in web/static/src/js/chrome.js +784 (instance.web.Reload).
I don't know how the reload will behave though, ie if it will stay on the current page.
In the __init__.py modules, could you replace the absolute imports with relative ones, so instead of:
import model
write:
from . import model
This is a good habit because if an egg or an openerp module is named model, it could import it instead of your module.
Thanks!
--
https://code.launchpad.net/~sylvain-legal/web-addons/7.0-web_easy_switch_company/+merge/210289
Your team Web-Addons Core Editors is subscribed to branch lp:web-addons.
References