ODOO的命令行调用以及config默认值

通过odoo-bin 可以启动odoo server ,启动的过程中需要提供一些args,包括数据库设置,ip设置等

如果不想每次输入这些参数,可以直接修改odoo/tools/config.py中的默认值来完成

 1  group = optparse.OptionGroup(parser, "Database related options")
 2         group.add_option("-d", "--database", dest="db_name", my_default=False, 
 3                          help="specify the database name")
 4         group.add_option("-r", "--db_user", dest="db_user", my_default='odoo',--原来为False
 5                          help="specify the database user name")
 6         group.add_option("-w", "--db_password", dest="db_password", my_default='odoo',--原来为False
 7                          help="specify the database password")
 8         group.add_option("--pg_path", dest="pg_path", help="specify the pg executable path")
 9         group.add_option("--db_host", dest="db_host", my_default='127.0.0.1',--原来为空
10                          help="specify the database host")
11         group.add_option("--db_port", dest="db_port", my_default='5432',
12                          help="specify the database port", type="int")
13         group.add_option("--db_maxconn", dest="db_maxconn", type='int', my_default=64,
14                          help="specify the the maximum number of physical connections to posgresql")

 

转载于:https://www.cnblogs.com/qianheng/p/6243240.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值