We will begin by creating a directory to hold our Odoo module. We have two options for where we can create the directory to hold our module. For our first option, we could create our directory in the addons folder where all the rest of the add-ons for Odoo are stored. This method is easy and allows Odoo to see our module simply by restarting the Odoo server.
A more preferred method, and the one we will use for this example, is to create a separate folder to hold our add-ons. This method has the advantage that we keep our modules separate from the standard Odoo modules.
Create a new directory to hold our modules by typing the following command in the Terminal:
sudo mkdir /home/mymodules
For Odoo to find this directory, we need to modify the Odoo configuration file that we looked at previously:
sudo nano /etc/odoo/odoo.conf
Here we can see a screen-shot of the configuration file:
We have edited the odoo.conf file to contain the mymodules directory within our home directory to store our custom Odoo modules.
Now we need to create a directory to hold the actual module itself:
sudo mkdir /home/mymodules/silkworm