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")

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM