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

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.

主站蜘蛛池模板: 建宁县| 锡林郭勒盟| 唐山市| 襄汾县| 巴马| 宁武县| 平南县| 河间市| 孝感市| 青海省| 武穴市| 台北市| 右玉县| 承德市| 舒兰市| 木兰县| 新巴尔虎左旗| 浮梁县| 会东县| 年辖:市辖区| 巴林左旗| 沈阳市| 巩留县| 甘孜| 泾阳县| 荥经县| 金秀| 都昌县| 合水县| 衡阳市| 志丹县| 周口市| 寿宁县| 化州市| 平陆县| 庐江县| 车致| 监利县| 凤庆县| 定兴县| 万盛区|