openerp.service.stop_services()
sys.exit(0)
+def configure_babel_localedata_path():
+ # Workaround: py2exe and babel.
+ if hasattr(sys, 'frozen'):
+ import babel
+ babel.localedata._dirname = os.path.join(os.path.dirname(sys.executable), 'localedata')
+
if __name__ == "__main__":
os.environ["TZ"] = "UTC"
config = openerp.tools.config
+ configure_babel_localedata_path()
+
setup_signal_handlers()
if config["test_file"]:
for m in openerp.conf.server_wide_modules:
try:
- __import__(m)
- # Call any post_load hook.
- info = openerp.modules.module.load_information_from_description_file(m)
- if info['post_load']:
- getattr(sys.modules[m], info['post_load'])()
+ openerp.modules.module.load_openerp_module(m)
except Exception:
msg = ''
if m == 'web':