Merge branch upstream/8.0 into 8.0
authorSébastien CHAZALLET <s.chazallet@gmail.com>
Wed, 26 Nov 2014 10:07:24 +0000 (11:07 +0100)
committerSébastien CHAZALLET <s.chazallet@gmail.com>
Wed, 26 Nov 2014 10:07:24 +0000 (11:07 +0100)
openerp-wsgi.py

index 4a3f34d..25fc7ce 100644 (file)
 #   $ gunicorn openerp:service.wsgi_server.application -c openerp-wsgi.py
 
 import openerp
+from os import sep
+from os.path import dirname, realpath
+import inspect
+
+
+#>>> import os
+#>>> import inspect
+#>>> inspect.getfile(os)
+#'/usr/lib64/python2.7/os.pyc'
+#>>> inspect.getfile(inspect)
+#'/usr/lib64/python2.7/inspect.pyc'
+#>>> os.path.dirname(inspect.getfile(inspect))
+#'/usr/lib64/python2.7'
+
 
 #----------------------------------------------------------
 # Common
@@ -26,7 +40,23 @@ conf = openerp.tools.config
 # Path to the OpenERP Addons repository (comma-separated for
 # multiple locations)
 
-conf['addons_path'] = '../../addons/trunk,../../web/trunk/addons'
+#base_path = realpath(dirname(__file__))
+base_path = realpath(dirname(inspect.getfile(inspect.currentframe())))
+
+addons_path_base = sep.join((base_path, "addons"))
+
+addons_path_include = ",".join(sep.join((base_path, "include", path)) for path in (
+    "account-analytic",
+#    "account-closing",
+    "account-financial-reporting",
+    "account-financial-tools",
+    "account-invoicing",
+    "acsone-addons",
+    "bank-statement-reconcile",
+    "custom/8.0",
+))
+
+conf["addons_path"] = ",".join((addons_path_base, addons_path_include))
 
 # Optional database config if not using local socket
 #conf['db_name'] = 'mycompany'
@@ -46,10 +76,10 @@ openerp.service.server.load_server_wide_modules()
 # Gunicorn
 #----------------------------------------------------------
 # Standard OpenERP XML-RPC port is 8069
-bind = '127.0.0.1:8069'
-pidfile = '.gunicorn.pid'
-workers = 4
-timeout = 240
-max_requests = 2000
+#bind = '127.0.0.1:8069'
+#pidfile = '.gunicorn.pid'
+#workers = 4
+#timeout = 240
+#max_requests = 2000
 
 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: