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

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.

主站蜘蛛池模板: 郴州市| 西乡县| 辽源市| 盘锦市| 平武县| 五原县| 深州市| 固原市| 南通市| 策勒县| 郸城县| 抚远县| 政和县| 宣化县| 万州区| 阜南县| 柘荣县| 新野县| 华坪县| 长汀县| 榆树市| 潮州市| 罗江县| 镇康县| 托里县| 黄浦区| 新兴县| 闸北区| 拉萨市| 荣成市| 高邮市| 麻栗坡县| 监利县| 秦皇岛市| 佛坪县| 寻甸| 淮滨县| 甘南县| 潞西市| 营口市| 河源市|