There's moreā€¦

When you call the odoo-bin script for the first time to initialize a new database, you can pass the --addons-path command-line argument with a comma-separated list of directories. This will initialize the list of available add-on modules with all of the add-ons found in the supplied add-ons path. When you do this, you have to explicitly include the base add-ons directory (odoo/odoo/addons), as well as the core add-ons directory (odoo/addons).

A small difference with the preceding recipe is that the local add-ons must not be empty; they must contain at least one sub-directory, which has the minimal structure of an add-on module. In Chapter 4, Creating Odoo Add-On Modules, we will look at how to write your own modules. In the meantime, here's a quick hack to produce something that will make Odoo happy:

$ mkdir -p ~/odoo-dev/local-addons/dummy
$ touch ~/odoo-dev/local-addons/dummy/__init__.py
$ echo '{"name": "dummy", "installable": False}' >
~/odoo-dev/local-addons/dummy/__manifest__.py

You can use the --save option to save the path to the configuration file:

$ odoo/odoo-bin -d mydatabase 
--add-ons-path="odoo/odoo/addons,odoo/addons,~/odoo-dev/local-addons"
--save -c ~/odoo-dev/my-instance.cfg --stop-after-init

In this case, using relative paths is okay, since they will be converted into absolute paths in the configuration file.

Since Odoo only checks directories in the add-ons path for the presence of add-ons when the path is set from the command line, not when the path is loaded from a configuration file, the dummy module is no longer necessary. You may, therefore, remove it (or keep it until you're sure that you won't need to create a new configuration file).
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset