官术网_书友最值得收藏!

Adding to the addons path

To have new modules available for Odoo, we need to make sure the directory containing the module is in the addons path, then update the Odoo module list. Both actions have been explained in detail in the previous chapter, but here we will continue with a brief overview of what is needed.

We will position ourselves in our work directory and start the server with the appropriate addons path configuration:

$ cd ~/odoo-dev
$ ./odoo/odoo-bin -d todo --addons-path="custom-addons,odoo/addons" --save

The --save option saves the options you used in a configuration file. This spares us from repeating them every time we restart the server; just run ./odoo-bin and the last saved option will be used. You can specify the configuration file and location to use (and save to) using the -c option.

Look closely at the server log. It should have an INFO ? odoo: addons paths:[...] line. It should include our custom-addons directory.

Remember to also include any other addon directories you might be using. For instance, if you also have a ~/odoo-dev/extra directory containing additional modules to be used, you might want to include them also, using the --addons-path option:

--addons-path="custom-addons,extra,odoo/addons"

Now we need the Odoo instance to acknowledge the new module we just added.

主站蜘蛛池模板: 台湾省| 双城市| 宁强县| 莱州市| 江永县| 阆中市| 天门市| 淮阳县| 隆回县| 抚州市| 讷河市| 道真| 读书| 桂阳县| 马山县| 普陀区| 囊谦县| 麟游县| 竹溪县| 诏安县| 沙田区| 郴州市| 普兰店市| 太原市| 岑溪市| 张北县| 江北区| 云霄县| 唐河县| 西畴县| 衡山县| 海淀区| 开化县| 阳新县| 巴楚县| 北票市| 绥宁县| 拉萨市| 玉田县| 德惠市| 永春县|