In this tutorial, we'll walk through creating a custom module in Odoo 18, step by step. This is based on Dockerized VPS setup, where you are building odoo with docker container and official odoo 18 image. where .odoo-bin may not be available to scaffold the file structure.
Prerequisites
Make sure you have:
- An Odoo 18 instance running (Docker container preferred)
- Access to /mnt/extra-addons (your custom addons folder)
- Terminal access (SSH into your server)
- Basic Git setup (optional but recommended)
1: Create Your Module Folder
SSH into your VPS and create a new directory under /mnt/extra-addons.
cd /mnt/extra-addons/ mkdir qr_code_scanner cd qr_code_scanner
2: Create Required Files
Every Odoo module must have at least:
- __init__.py — tells Odoo it's a Python package
- __manifest__.py — describes the module metadata
Create them:
touch __init__.py touch __manifest__.py
3: Write the Manifest
Open __manifest__.py and paste the following:
{ 'name': 'QR Code Scanner', 'version': '18.0.1.0', //use the format 18.0.x.y 'summary': 'Scan QR codes and send emails to sales entries', 'description': 'An app to scan QR codes and send emails to sales entries.', 'author': 'Cedric Liu', 'category': 'Sales', 'license': 'LGPL-3', 'depends': ['base', 'sale'], 'data': [], 'installable': True, 'application': True, 'auto_install': False }
⚡ Important tips:
- Version must match 18.0.x.y format.
- Always specify 'license': 'LGPL-3' to avoid warnings.
- Make sure no trailing commas!
4: Restart Odoo Server
Tell Odoo to pick up the new module by restarting:
docker compose restart odoo
5: Update App List
- Login to your Odoo backend (https://yourdomain.com/web).
- Go to Apps → Update App List.
- Click Update.
Now you should see your QR Code Scanner app!
6: (Optional) Git Version Control
assuming you are developing your custom module using git, you will ned to track your work by following:
cd /mnt/extra-addons/ git init git remote add origin [email protected]:yourusername/odoo-custom-addons.git git add qr_code_scanner git commit -m "Initial commit - QR Code Scanner module" git push -u origin main