+5
-4
@@ -7,26 +7,27 @@
|
||||
#
|
||||
# For generic wsgi handlers a global application is defined.
|
||||
# For uwsgi this should work:
|
||||
# $ uwsgi --http :9090 --pythonpath . --wsgi-file openerp-wsgi.py
|
||||
# $ uwsgi_python --http :9090 --pythonpath . --wsgi-file openerp-wsgi.py
|
||||
#
|
||||
# For gunicorn additional globals need to be defined in the Gunicorn section.
|
||||
# Then the following command should run:
|
||||
# $ gunicorn openerp:application -c openerp-wsgi.py
|
||||
# $ gunicorn openerp:service.wsgi_server.application -c openerp-wsgi.py
|
||||
|
||||
import openerp
|
||||
|
||||
#----------------------------------------------------------
|
||||
# Common
|
||||
#----------------------------------------------------------
|
||||
openerp.multi_process = True # Nah!
|
||||
|
||||
# Equivalent of --load command-line option
|
||||
openerp.conf.server_wide_modules = ['web']
|
||||
conf = openerp.tools.config
|
||||
|
||||
# Path to the OpenERP Addons repository (comma-separated for
|
||||
# multiple locations)
|
||||
conf['addons_path'] = '/home/openerp/addons/trunk,/home/openerp/web/trunk/addons'
|
||||
conf['addons_path'] = '/home/wis/stuff/version/openerp/source/addons/6.1,/home/wis/stuff/version/openerp/source/web/6.1/addons'
|
||||
|
||||
conf['addons_path'] = '../../addons/trunk,../../web/trunk/addons'
|
||||
|
||||
# Optional database config if not using local socket
|
||||
#conf['db_name'] = 'mycompany'
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@ wsgi.register_wsgi_handler = wsgi.wsgi_server.register_wsgi_handler
|
||||
# e.g. database update or cache invalidation. Each process has also
|
||||
# its own copy of the data structure and we don't need to care about
|
||||
# locks between threads.
|
||||
multi_process = True
|
||||
multi_process = False
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
||||
@@ -14,5 +14,12 @@
|
||||
<field name="company_id" ref="main_company"/>
|
||||
<field name="groups_id" eval="[(6,0,[ref('base.group_user')])]"/>
|
||||
</record>
|
||||
|
||||
<!-- new rate for demo transactions in multi currency -->
|
||||
<record id="rateUSDbis" model="res.currency.rate">
|
||||
<field name="rate">1.5289</field>
|
||||
<field name="currency_id" ref="USD"/>
|
||||
<field eval="time.strftime('%Y-06-06')" name="name"/>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -7,14 +7,14 @@ msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.4\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2012-02-08 00:44+0000\n"
|
||||
"PO-Revision-Date: 2012-09-10 14:37+0000\n"
|
||||
"PO-Revision-Date: 2012-09-24 14:20+0000\n"
|
||||
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2012-09-20 04:40+0000\n"
|
||||
"X-Generator: Launchpad (build 15985)\n"
|
||||
"X-Launchpad-Export-Date: 2012-09-25 04:44+0000\n"
|
||||
"X-Generator: Launchpad (build 16019)\n"
|
||||
|
||||
#. module: base
|
||||
#: model:res.country,name:base.sh
|
||||
@@ -18206,7 +18206,7 @@ msgstr "Корпорация"
|
||||
#. module: base
|
||||
#: model:ir.module.module,shortdesc:base.module_purchase_requisition
|
||||
msgid "Purchase Requisitions"
|
||||
msgstr "Требования закупки"
|
||||
msgstr "Запросы на закупку"
|
||||
|
||||
#. module: base
|
||||
#: selection:ir.cron,interval_type:0
|
||||
|
||||
@@ -192,7 +192,6 @@ class view(osv.osv):
|
||||
def write(self, cr, uid, ids, vals, context=None):
|
||||
if not isinstance(ids, (list, tuple)):
|
||||
ids = [ids]
|
||||
result = super(view, self).write(cr, uid, ids, vals, context)
|
||||
|
||||
# drop the corresponding view customizations (used for dashboards for example), otherwise
|
||||
# not all users would see the updated views
|
||||
@@ -200,7 +199,7 @@ class view(osv.osv):
|
||||
if custom_view_ids:
|
||||
self.pool.get('ir.ui.view.custom').unlink(cr, uid, custom_view_ids)
|
||||
|
||||
return result
|
||||
return super(view, self).write(cr, uid, ids, vals, context)
|
||||
|
||||
def graph_get(self, cr, uid, id, model, node_obj, conn_obj, src_node, des_node, label, scale, context=None):
|
||||
nodes=[]
|
||||
|
||||
@@ -78,8 +78,6 @@ def start_internal():
|
||||
|
||||
def start_services():
|
||||
""" Start all services including http, netrpc and cron """
|
||||
openerp.multi_process = False # Nah!
|
||||
|
||||
start_internal()
|
||||
|
||||
# Initialize the HTTP stack.
|
||||
@@ -120,6 +118,8 @@ def stop_services():
|
||||
openerp.modules.registry.RegistryManager.delete_all()
|
||||
|
||||
def start_services_workers():
|
||||
openerp.multi_process = True # Nah!
|
||||
|
||||
openerp.service.workers.Multicorn(openerp.service.wsgi_server.application).run()
|
||||
|
||||
|
||||
|
||||
@@ -3,7 +3,10 @@
|
||||
# TODO rename class: Multicorn -> Arbiter ?
|
||||
#-----------------------------------------------------------
|
||||
import errno
|
||||
import fcntl
|
||||
try:
|
||||
import fcntl
|
||||
except ImportError:
|
||||
fcntl = None
|
||||
import psutil
|
||||
import random
|
||||
import resource
|
||||
|
||||
@@ -402,7 +402,7 @@ def application_unproxied(environ, start_response):
|
||||
return [response]
|
||||
|
||||
def application(environ, start_response):
|
||||
if 'HTTP_X_FORWARDED_HOST' in environ:
|
||||
if config['proxy_mode'] and 'HTTP_X_FORWARDED_HOST' in environ:
|
||||
return werkzeug.contrib.fixers.ProxyFix(application_unproxied)(environ, start_response)
|
||||
else:
|
||||
return application_unproxied(environ, start_response)
|
||||
|
||||
@@ -116,6 +116,8 @@ class configmanager(object):
|
||||
help="specify the TCP port for the XML-RPC protocol", type="int")
|
||||
group.add_option("--no-xmlrpc", dest="xmlrpc", action="store_false", my_default=True,
|
||||
help="disable the XML-RPC protocol")
|
||||
group.add_option("--proxy-mode", dest="proxy_mode", action="store_true", my_default=False,
|
||||
help="Enable correct behavior when behind a reverse proxy")
|
||||
parser.add_option_group(group)
|
||||
|
||||
# XML-RPC / HTTPS
|
||||
@@ -394,7 +396,7 @@ class configmanager(object):
|
||||
'language', 'translate_out', 'translate_in', 'overwrite_existing_translations',
|
||||
'debug_mode', 'smtp_ssl', 'load_language',
|
||||
'stop_after_init', 'logrotate', 'without_demo', 'netrpc', 'xmlrpc', 'syslog',
|
||||
'list_db', 'xmlrpcs',
|
||||
'list_db', 'xmlrpcs', 'proxy_mode',
|
||||
'test_file', 'test_enable', 'test_commit', 'test_report_directory',
|
||||
'osv_memory_count_limit', 'osv_memory_age_limit', 'max_cron_threads', 'unaccent',
|
||||
'workers', 'limit_memory_hard', 'limit_memory_soft', 'limit_time_cpu', 'limit_time_real', 'limit_request'
|
||||
|
||||
Reference in New Issue
Block a user