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

Adding to the addons path

Now that we have a new module, even if minimal, we want to make it available in Odoo.

For that, we need to make sure the directory the module is in is part of the addons path. And then we need to update the Odoo module list.

Both operations have been explained in detail in the previous chapter, but we will follow here with a brief overview of what is needed.

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

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

The --save option saves the options you used in a config file. This spares you from repeating them the next time you restart the server: just run ./odoo.py and the last saved options will be used.

Look closely at the server log. It should have an INFO ? openerp: addons paths: (...) line, and it should include our custom-addons directory.

Remember to also include any other addons directories you might be using. For instance, if you followed the last chapter's instructions to install the department repository, you might want to include it and use the option:

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

Now let's ask Odoo to acknowledge the new module we just added.

For that, in the Modules section of the Settings menu, select the Update Modules List option. This will update the module list adding any modules added since the last update to the list. Remember that we need the Technical Features enabled for this option to be visible. That is done by selecting the Technical Features checkbox for our user.

主站蜘蛛池模板: 酉阳| 霍城县| 休宁县| 岳普湖县| 晋中市| 唐河县| 阳东县| 延川县| 聂拉木县| 昭苏县| 昆明市| 海晏县| 当雄县| 聂荣县| 定陶县| 温宿县| 武乡县| 卓尼县| 安丘市| 体育| 汕尾市| 江山市| 商南县| 玉环县| 广东省| 天镇县| 永福县| 乌兰县| 德令哈市| 洪泽县| 通州市| 平南县| 贵南县| 隆尧县| 永吉县| 淮阳县| 晋宁县| 察隅县| 宝坻区| 宣武区| 鄱阳县|