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

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.

主站蜘蛛池模板: 台南县| 信宜市| 凉城县| 资中县| 进贤县| 东宁县| 望谟县| 南靖县| 黄龙县| 台州市| 东兴市| 土默特左旗| 黄骅市| 九台市| 昂仁县| 同心县| 滨海县| 临桂县| 宜君县| 图片| 东兰县| 泸州市| 东乡| 漳州市| 响水县| 庆安县| 朝阳市| 苏尼特左旗| 垦利县| 岱山县| 团风县| 赣榆县| 定南县| 庆云县| 上虞市| 厦门市| 额尔古纳市| 东丽区| 安西县| 珠海市| 建德市|