Odoo的配置文件

解压版的Odoo,配置文件网上搜一下,全是;这里记录一下源码安装的配置文件。
注:Mac主机,Odoo 10.0


我们打开config.py文件,在97行和352行找到一下代码:
97行开始处

```

Server startup config

    group = optparse.OptionGroup(parser, "Common options")
    group.add_option("-c", "--config", dest="config", help="specify alternate config file")
    group.add_option("-s", "--save", action="store_true", dest="save", default=False,
                      help="save configuration to ~/.odoorc (or to ~/.openerp_serverrc if it exists)")
    group.add_option("-i", "--init", dest="init", help="install one or more modules (comma-separated list, use \"all\" for all modules), requires -d")
    group.add_option("-u", "--update", dest="update",
                      help="update one or more modules (comma-separated list, use \"all\" for all modules). Requires -d.")

352行开始处
```
        if os.name == 'nt':
            rcfilepath = os.path.join(os.path.abspath(os.path.dirname(sys.argv[0])), 'odoo.conf')
        else:
            rcfilepath = os.path.expanduser('~/.odoorc')
            old_rcfilepath = os.path.expanduser('~/.openerp_serverrc')

            die(os.path.isfile(rcfilepath) and os.path.isfile(old_rcfilepath),
                "Found '.odoorc' and '.openerp_serverrc' in your path. Please keep only one of "\
                "them, preferrably '.odoorc'.")

            if not os.path.isfile(rcfilepath) and os.path.isfile(old_rcfilepath):
                rcfilepath = old_rcfilepath
```
便可以发现配置文件~/.odoorc 下面是该配置文件的各个参数的含义,若有不对,请指正:
```
; addons模块的查找路径
addons_path = /Users/lovedrose/Documents/Odoo/Projects/odoo-10.0/addons,/Users/lovedrose/Documents/Odoo/Projects/odoo-10.0/my_module
; 管理员主控密码(用于创建、还原和备份数据库等操纵)
admin_passwd = admin
; 自动加载
; auto_reload = None
; 用于导入导出的csv文件的默认分割符
csv_internal_sep = ,
; data目录,用于存放seesion信息、附件
data_dir = /Users/lovedrose/Library/Application Support/Odoo
; 数据库主机名
db_host = False
; 数据库最大连接数
db_maxconn = 64
; 指定要使用的数据库
db_name = False
; 数据库密码
db_password = False
; 数据库端口
db_port = False
; 创建新数据库时使用的数据库模版
db_template = template1
; 数据库用户名
db_user = False
; 过滤要显示的数据库
dbfilter = .*
; 加载指定模块的数据
demo = {}
; 发送邮件的邮箱地址
email_from = False
;
geoip_database = /usr/share/GeoIP/GeoLiteCity.dat
; 在导入大量数据时使用这个选项, 如果在导入期间程序宕机, 你可以在当前状态下继续。指定一个存储中间导入状态的文件名
import_partial =
; 一个处理器允许使用的最大物理内存
limit_memory_hard = 2684354560
; 一个处理器允许使用的最大虚拟内存
limit_memory_soft = 2147483648
; 一个处理器接受的最大请求数
limit_request = 8192
; 一个请求最多占用多少处理时间
limit_time_cpu = 60
; 一个请求允许的最长实时时间
limit_time_real = 120
;
limit_time_real_cron = -1
; 是否允许显示数据库列表
list_db = True
; 是否将log写入ir_logging表
log_db = True
;
log_db_level = warning
; 可以是一组module:log_level对, 默认值是:INFO(表示所有模块的默认日志级别为INFO级别) 
log_handler = :INFO
; 日志的级别, 可选值包括debug_rpc_answer, debug_rpc, debug, debug_sql, info, warn, error, critical
log_level = info
; 指定用来存储日志的文件
logfile = False
; 是否按天存放日志
logrotate = True
; 长连接池使用的端口号
longpolling_port = 8072
; 处理当前计划任务的最大线程数
max_cron_threads = 2
; 强制保存在virtual osv_memory表中的记录的最长时间,以小时为单位
osv_memory_age_limit = 1.0
; 强制一个virtual osv_memory表的最大记录数
osv_memory_count_limit = False
; 数据库可执行的路径
pg_path = None
; 存储服务器pid的文件名
pidfile = False
; 是否使用反向代理模式
proxy_mode = False
; 是否压缩报表
reportgz = False
; server范围的模块,以逗号分隔
server_wide_modules = web,web_kanban
; 发送邮件的smtp密码
smtp_password = False
; smpt端口号
smtp_port = 25
; smtp服务器名
smtp_server = localhost
; smtp服务器是否支持ssl协议
smtp_ssl = False
; 发送邮件的smtp用户名
smtp_user = False
; 是否把日志发送给系统日志服务器
syslog = False
; 是否提交yaml或xml测试造成的数据库更改
test_commit = False
; 是否允许yaml和单元测试
test_enable = False
; yaml测试文件
test_file = False
; 报表范例的存放位置
test_report_directory = False
; 可翻译的模块,默认为all
translate_modules = ['all']
; 是否使用数据库的unaccent功能
unaccent = False
; 在安装时候,哪些模块不加载演示数据
without_demo = False
; 要使用的处理器数量
workers = 0
; 是否禁止使用xml-rpc协议
xmlrpc = True
; 指定使用XML-RPC协议的IP地址,为空时表示绑定到现有IP
xmlrpc_interface =
; XML-RPC协议使用的TCP端口
xmlrpc_port = 8070
```

你可能感兴趣的:(Odoo的配置文件)