Server IP : 127.0.0.2 / Your IP : 18.223.239.171 Web Server : Apache/2.4.18 (Ubuntu) System : User : www-data ( ) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : disk_free_space,disk_total_space,diskfreespace,dl,exec,fpaththru,getmyuid,getmypid,highlight_file,ignore_user_abord,leak,listen,link,opcache_get_configuration,opcache_get_status,passthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,php_uname,phpinfo,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,pclose,popen,proc_open,proc_close,proc_get_status,proc_nice,proc_terminate,shell_exec,source,show_source,system,virtual MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /opt/odoo/odoo/ |
Upload File : |
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. """ OpenERP core library.""" #---------------------------------------------------------- # Running mode flags (gevent, prefork) #---------------------------------------------------------- # Is the server running with gevent. import sys evented = False if len(sys.argv) > 1 and sys.argv[1] == 'gevent': sys.argv.remove('gevent') import gevent.monkey gevent.monkey.patch_all() import psycogreen.gevent psycogreen.gevent.patch_psycopg() evented = True # Is the server running in prefork mode (e.g. behind Gunicorn). # If this is True, the processes have to communicate some events, # 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 = False #---------------------------------------------------------- # libc UTC hack #---------------------------------------------------------- # Make sure the OpenERP server runs in UTC. import os os.environ['TZ'] = 'UTC' # Set the timezone import time if hasattr(time, 'tzset'): time.tzset() #---------------------------------------------------------- # Shortcuts #---------------------------------------------------------- # The hard-coded super-user id (a.k.a. administrator, or root user). SUPERUSER_ID = 1 def registry(database_name=None): """ Return the model registry for the given database, or the database mentioned on the current thread. If the registry does not exist yet, it is created on the fly. """ if database_name is None: import threading database_name = threading.currentThread().dbname return modules.registry.Registry(database_name) #---------------------------------------------------------- # Imports #---------------------------------------------------------- import addons import conf import loglevels import modules import netsvc import osv import release import report import service import sql_db import tools import workflow #---------------------------------------------------------- # Model classes, fields, api decorators, and translations #---------------------------------------------------------- from . import models from . import fields from . import api from odoo.tools.translate import _ #---------------------------------------------------------- # Other imports, which may require stuff from above #---------------------------------------------------------- import cli import http