Odoo Configuration File - BOOKC -->

Odoo Configuration File

Wednesday, October 2, 2019

Today I am going to discuss about configuration file in odoo, and how to get the parameters defined in this file in our code.



Odoo Configuration File

What is odoo configuration file

Configuration file or (openerp-server.conf) file is one of the most important file in odoo. This file contains the parameters to run the Odoo. The parameters used in (openerp-server.conf) are given below:

addons_path = C:\Program Files (x86)\Odoo 8.0-20150811\server\openerp\addons
admin_passwd = admin
auto_reload = None
bin_path = C:\Program Files (x86)\Odoo 8.0-20150811\thirdparty
csv_internal_sep = ,
data_dir = C:\Users\XYZ\AppData\Local\OpenERP S.A.\Odoo
db_host = localhost
db_maxconn = 64
db_name = False
db_password = 123
db_port = 5433
db_template = template1
db_user = openerp
dbfilter = .*
debug_mode = False
demo = {}
email_from = False
geoip_database = /usr/share/GeoIP/GeoLiteCity.dat
import_partial = 
limit_memory_hard = None
limit_memory_soft = None
limit_request = None
limit_time_cpu = None
limit_time_real = None
list_db = True
log_db = False
log_db_level = warning
log_handler = :INFO
log_level = info
logfile = C:\Program Files (x86)\Odoo 8.0-20150811\server\openerp-server.log      
logrotate = False
longpolling_port = 8072
max_cron_threads = 2
osv_memory_age_limit = 1.0
osv_memory_count_limit = False
pg_path = None
pidfile = None
proxy_mode = False
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 = None
xmlrpc = True
xmlrpc_interface = 
xmlrpc_port = 8069
xmlrpcs = True
xmlrpcs_interface = 
xmlrpcs_port = 8071       
 

We can change the above configuration as per our need. Odoo loads the configuration in three steps.First loading the default configuration and second from the configuration file then last from the command line configuration that we supplied each time it will overwrite the previous one.

How to get the parameters defined in (openerp-server.conf) in our code


You can access all the details saved in configuration file by importing "from openerp.tools import config"