Understanding Odoo Configuration File
9 July, 2020 by
Understanding Odoo Configuration File
PT. KIN SOFT INDONESIA, Admin Kinsoft

The odoo configuration file is used for set up configuration parameters for running odoo.

We can change default odoo configuration according to our need in the odoo configuration file .

Here is the odoo configuration file,

[options]
addons_path = /home/odoo/addons
admin_passwd = admin
auto_reload = False
csv_internal_sep = ,
db_host = False
db_maxconn = 64
#db_name = testdb
db_password = False
db_port = False
db_template = template1
db_user = odoo
dbfilter = .*
debug_mode = true
email_from = False
import_partial =
limit_memory_hard = 2684354560
limit_memory_soft = 2147483648
limit_request = 8192
limit_time_cpu = 60
limit_time_real = 120
list_db = True
log_db = False
log_handler = [':INFO']
log_level = info
logfile = /var/log/odoo/odoo.log
logrotate = False
longpolling_port = 8072
max_cron_threads = 2
osv_memory_age_limit = 1.0
osv_memory_count_limit = False
pg_path = None
proxy_mode = True
reportgz = False
secure_cert_file = server.cert
secure_pkey_file = server.pkey
server_wide_modules = None
smtp_password = False
smtp_port = 25
smtp_server = localhost
smtp_ssl = False
smtp_user = False
syslog = False
test_commit = False
test_enable = False
test_file = False
test_report_directory = False
timezone = False
translate_modules = ['all']
unaccent = False
without_demo = False
workers = 0
xmlrpc = True
xmlrpc_interface =
xmlrpc_port = 8069
xmlrpcs = True
xmlrpcs_interface =
xmlrpcs_port = 8079

addons_path 

you need to add your addons path here

admin_passwd

set master password here for database creation, deletion and restore restriction

auto_reload

enable auto-reloading of python files and xml files without having to restart the server

csv_internal_sep

default CSV separator for import and export

db_host

specify the host for the database server

db_maxconn

specify the maximum number of physical connections to PostgreSQL

db_name

specify database name

db_password 

set database password

db_port

port the database listens on, defaults to 5432

db_template

specify a custom database template to create a new database

db_user

database username used to connect to PostgreSQL

dbfilter

Filter listed database, we can supply any regular expressions, if we want to match the DB with the subdomain.

debug_mode

To enable debug mode

email_from

specify the SMTP email address for sending email

import_partial

enabling the partial import in Odoo

limit_memory_hard

Maximum allowed virtual memory per worker, when reached, any memory allocation will fail

limit-memory-hard = 640 * your workers (e.g 4) *1024 * 1024 = 2684354560

limit_memory_soft

Maximum allowed virtual memory per worker, when reached the worker be reset after the current request

limit_request

Maximum number of request to be processed per worker

limit_time_cpu

Maximum allowed CPU time per request

limit_time_real

Maximum allowed Real time per request

list_db

disable the ability to return the list of databases

log_db

Specify the Logging database

log_handler

Setup a handler at LEVEL for a given PREFIX.

specify the level of the logging. Accepted values: info, debug_rpc, warn, test, critical, debug_sql, error,debug, debug_rpc_answer, notse 

//default logging handlers

DEFAULT_LOG_CONFIGURATION = [ 'openerp.workflow.workitem:WARNING', 'openerp.http.rpc.request:INFO', 'openerp.http.rpc.response:INFO', 'openerp.addons.web.http:INFO', 'openerp.sql_db:INFO', ':INFO', ]

log_level

specify the level of the logging.

log_level can be used to specify the log level which can take any values from the below list.

//default logging levels

levels = [ 'info', 'debug_rpc', 'warn', 'test', 'critical', 'debug_sql', 'error', 'debug', 'debug_rpc_answer', 'notset' ]

logfile

Specify the log file to store the log details.

logrotate

True/False. If True, create a daily log file and keep 30 files.

longpolling_port

specify the TCP port for longpolling requests.

max_cron_threads

Maximum number of threads processing concurrently cron jobs

osv_memory_age_limit

Force a limit on the maximum age of records kept in the virtual

osv_memory_count_limit

handles the max count of records that is kept in the osv_memory tables

pg_path

specify the psql executable path

proxy_mode

Enable correct behavior when behind a reverse proxy

proxy_mode accepts True/False values. For security reasons, it's important for Odoo to make sure the proxy_mode parameter is set to True. The reason for this is that, when Nginx acts as a proxy, all request will appear to come from the server itself instead of the remote IP address. Setting the X-Forwarded-For header in the proxy and enabling proxy_mode solves that. But enabling proxy_mode without forcing this header at the proxy level would allow anyone to spoof their remote address.and also enables when sending any email it will leave the internal port number from the link if proxy_mode is on.

Secure_cert_file

 specify the certificate file for the SSL connection

Secure_pkey_file

specify the private key file for the SSL connection

Server_wide_modules

Comma-separated list of server-wide modules

smtp_password

specify the SMTP password for sending email

smtp_port

specify the SMTP port

smtp_server

specify the SMTP server for sending email

smtp_ssl

if true, SMTP connections will be encrypted with SSL (STARTTLS)

smtp_user

specify the SMTP username for sending email

syslog

Send the log to the syslog server

test_commit

 Commit database changes performed by YAML or XML tests

test_enable

Enable YML and unit testing in odoo

test_file

launch a python or YML test file. test_enable must be True.

test_report_directory

Path to the file directory

The result of the test can be stored in a file specified by the test_report_directory

timezone

used to compute the difference between the user's time and the server's time and convert it before storing time data, and do the reverse after reading it.

translate_modules

specify modules to export for translation.

unaccent

Use the unaccent function provided by the database when available

without_demo

disable loading demo data for modules to be installed

without_demo is really a database-creation flag. It does work when installing things into a completely empty database (just created with createdb).Other cases aren't supported, in the best cases the option is essentially ignored and in the worst cases it can leave the database in a state requiring manual intervention. You can set >without_demo=WITHOUT_DEMO for disabling all demo data. You can also specify different modules by seperated by commas. This is usually a command line option so that you have to specify the correct database to use

workers

Specify the number of workers, 0 disable prefork mode

Odoo provides its own configuration for multiprocessing. As default Odoo uses only one process. But in production states the number users and quantity of data will be large. So Odoo need to handle significant workload, to enable the multiprocessing we can set workers option greater than one

xmlrpc

disable the xmlrpc protocol

xmlrpc_interface

Specify the TCP IP address for the XML-RPC protocol

xmlrpc_port

specify the TCP port for the XML-RPC protocol

xmlrpcs

 disable the XML-RPC Secure protocol

xmlrpcs_interface

 Specify the TCP IP address for the XML-RPC Secure protocol. The empty string binds to all interfaces.

xmlrpcs_port

specify the TCP port for the XML-RPC Secure protocol


Source: https://www.odoowikia.com/blog/general-5/post/understanding-odoo-configuration-file-6

Understanding Odoo Configuration File
PT. KIN SOFT INDONESIA, Admin Kinsoft
9 July, 2020
Share this post
Archive