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