Contributing¶
Development Environment¶
Prerequisites¶
- Odoo 18 installed locally
- Python 3.12
- PostgreSQL 16
- Git repository access
Setup¶
# Clone the module into the addons directory
cd /path/to/odoo/kalpana-addons
git clone <repo-url> airdoo
# Activate the Odoo virtualenv
cd /path/to/odoo && source venv/bin/activate
# Install Python dependencies for the module
pip install google-auth google-auth-oauthlib google-api-python-client html2text
# Start Odoo with module update
python odoo-server/odoo-bin -c config/odoo.conf -d odoo_dev -u airdoo
Module Structure¶
airdoo/
├── models/
│ ├── airdoo_accommodation.py # Accommodation model
│ ├── sale_order.py # Booking extension
│ ├── communication_rule.py # Communication rules
│ ├── airdoo_communication_log.py # Send logs
│ ├── communication_engine.py # Scheduling engine
│ ├── airdoo_parser.py # Airbnb email parser
│ ├── gmail_service.py # Gmail OAuth2 service
│ └── res_config_settings.py # Configuration
├── controllers/
│ ├── airdoo_v1_api.py # REST API v1
│ ├── webhook_api.py # Webhooks
│ └── booking_api_deprecated.py # Deprecated endpoints
├── views/ # Odoo XML views
├── data/ # Initial data (templates, crons)
├── tests/
│ └── test_comm_engine.py # Unit tests (24 tests)
└── docs/ # This documentation
Development Workflow¶
- Create a branch from
main - Develop the code
- Test with
--test-enable --test-tags airdoo - Open a MR to
main
Code Conventions¶
- Follow Odoo 18 conventions (modern API, no legacy APIs)
- Add
_logger.info()for important operations - Document complex methods with a docstring
- No print() — use
_logger
Running Tests¶
python odoo-server/odoo-bin -c config/odoo.conf \
-d odoo_test -u airdoo \
--stop-after-init \
--test-enable \
--test-tags airdoo
← Back: Architecture | Next: Tests →