Odoo服务器启动
openerp-server
openerp-server是启动Odoo服务器的第一步,其代码如下。
#!/usr/bin/env python
import openerp
if __name__ == "__main__":
openerp.cli.main()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
调用了openerp.cli.main()
opernerp.cli.main
...
import server
import deploy
import scaffold
import start
def main():
args = sys.argv[1:]
# The only shared option is '--addons-path=' needed to discover additional
# commands from modules
if len(args) > 1 and args[0].startswith('--addons-path=')