| name | odoo-app-automator |
| description | AI agent for automated Odoo module creation, deployment, and third-party integration. Scaffolds custom modules, generates Odoo Studio configurations, sets up containers, and automates app deployment following Odoo 19 best practices. |
Odoo App Automator
AI-powered automation for creating, deploying, and managing Odoo modules and custom applications. This skill enables AI agents to generate production-ready Odoo modules, configure Studio customizations, set up containerized deployments, and integrate third-party services.
Purpose
Automate the entire lifecycle of Odoo custom module development:
- Module Scaffolding: Generate complete Odoo module structures with models, views, security, and data
- Studio Integration: Programmatically configure Odoo Studio customizations
- Container Deployment: Set up Odoo.sh containers with dependencies and configurations
- Third-Party Integration: Connect external APIs, payment providers, and business services
- Upgrade Management: Handle version upgrades and module migrations
When to Use This Skill
Use this skill when the user requests:
- "Create a custom Odoo module for [purpose]"
- "Build an Odoo app for [business process]"
- "Automate [workflow] in Odoo"
- "Deploy a custom Odoo module"
- "Integrate [third-party service] with Odoo"
- "Set up Odoo Studio customizations"
- "Migrate custom module from Odoo [version] to [version]"
Core Capabilities
1. Module Scaffolding
Generate complete Odoo module structures following best practices:
Module Structure:
custom_module/
├── __init__.py
├── __manifest__.py
├── models/
│ ├── __init__.py
│ └── custom_model.py
├── views/
│ ├── custom_views.xml
│ └── menu_views.xml
├── security/
│ ├── ir.model.access.csv
│ └── security_groups.xml
├── data/
│ └── default_data.xml
├── static/
│ ├── description/
│ │ ├── index.html
│ │ └── icon.png
│ └── src/
│ ├── js/
│ ├── css/
│ └── xml/
├── wizards/
├── reports/
├── controllers/
└── README.md
Key Files to Generate:
__manifest__.py: Module metadatamodels/*.py: Business logic and database modelsviews/*.xml: UI definitions (form, tree, kanban, search)security/ir.model.access.csv: Access control rulesdata/*.xml: Default data and demo dataREADME.md: Documentation
2. Odoo Studio Automation
Configure Studio customizations programmatically:
Studio Capabilities:
- Add/modify fields to existing models
- Create custom views (form, list, kanban, pivot, graph)
- Define automated actions and workflows
- Set up filters and default values
- Configure access rights and security rules
- Create reports and dashboards
Workflow:
- Export Studio customizations as modules
- Version control Studio-created modules
- Deploy to production via git
- Update Studio configs via XML data files
3. Container Setup (Odoo.sh)
Configure Odoo.sh containers with custom requirements:
Directory Structure:
/home/odoo/
├── src/
│ ├── odoo/ # Odoo Community
│ ├── enterprise/ # Odoo Enterprise
│ ├── themes/ # Themes
│ └── user/ # Custom modules
├── data/
│ ├── filestore/ # Attachments
│ └── sessions/ # User sessions
└── logs/
├── odoo.log
├── install.log
└── pip.log
Dependencies Management:
Create requirements.txt in repository root:
# Python dependencies
pandas>=1.5.0
requests>=2.28.0
pillow>=9.0.0
paddleocr>=2.6.0
supabase>=1.0.0
Custom Commands:
# Install module
odoo-bin -i custom_module --stop-after-init
# Update module
odoo-bin -u custom_module --stop-after-init
# Run tests
odoo-bin -i custom_module --test-enable --log-level=test --stop-after-init
# Odoo shell
odoo-bin shell
4. Third-Party Integration
Integrate external services into Odoo:
Common Integrations:
- Payment Providers: Stripe, PayPal, Paymongo (PH)
- Shipping: FedEx, DHL, LBC (PH)
- Accounting: QuickBooks, Xero
- CRM: Salesforce, HubSpot
- Communication: Slack, Microsoft Teams
- Storage: Google Drive, Dropbox, Supabase
- AI/ML: OpenAI, Anthropic Claude, PaddleOCR
Integration Pattern:
- Create API Wrapper Model:
class ExternalService(models.Model):
_name = 'external.service'
api_key = fields.Char(string='API Key')
base_url = fields.Char(string='Base URL')
def call_api(self, endpoint, method='GET', data=None):
url = f"{self.base_url}/{endpoint}"
headers = {'Authorization': f'Bearer {self.api_key}'}
response = requests.request(method, url, headers=headers, json=data)
return response.json()
- Add Configuration UI
- Implement Webhook Handlers
- Set Up Scheduled Actions
5. Upgrade Management
Handle version migrations for custom modules:
Upgrade Workflow:
- Request test upgrade from Odoo.sh or upgrade.odoo.com
- Update custom module code for new version
- Test upgraded database thoroughly
- Deploy to production
Module Version Compatibility:
# __manifest__.py
{
'name': 'Custom Module',
'version': '19.0.1.0.0', # Format: {odoo_version}.{major}.{minor}.{patch}
'depends': ['base', 'sale', 'account'],
}
Practical Examples for Finance SSC
Example 1: BIR Tax Filing Module
User Request: "Create an Odoo module for BIR tax form filing (1601-C, 2550Q, 1702-RT)"
Module Structure:
bir_tax_filing/
├── models/
│ ├── bir_form_1601c.py
│ ├── bir_form_2550q.py
│ └── bir_form_1702rt.py
├── views/
│ ├── bir_form_views.xml
│ └── bir_filing_schedule_views.xml
├── wizards/
│ └── bir_filing_wizard.py
├── reports/
│ ├── bir_pdf_reports.xml
│ └── bir_dat_export.py
└── data/
└── bir_default_schedules.xml
Key Features:
- Automated form generation from accounting data
- Filing schedule tracking
- .DAT file export for eBIRForms
- Compliance dashboard
- Multi-agency support (RIM, CKVC, BOM, JPAL, JLI, JAP, LAS, RMQB)
Example 2: Travel & Expense Management (SAP Concur Alternative)
User Request: "Build a self-hosted travel and expense management app"
Module Features:
- Travel request workflow
- Expense report submission
- Receipt OCR with PaddleOCR
- Policy validation
- Multi-level approvals
- GL account posting
- Budget tracking
Cost Savings: $15,000/year in licensing fees
Example 3: Superset Dashboard Integration
User Request: "Connect Odoo data to Apache Superset dashboards"
Implementation:
- Create database connector in Superset
- Build Odoo API endpoints for dashboard data
- Set up scheduled data synchronization
- Create pre-built dashboard templates
Use Cases:
- BIR compliance metrics
- Month-end closing progress
- Multi-agency financial KPIs
Example 4: Notion Workflow Sync
User Request: "Sync finance tasks between Notion and Odoo"
Implementation:
- Notion API integration module
- Task synchronization with external ID upserts
- Webhook handlers for real-time updates
- Scheduled actions for batch sync
Module Generation Workflow
Step 1: Requirements Gathering
Ask the user:
- Module Purpose: What business process does this automate?
- Core Entities: What are the main data models?
- User Workflows: What actions will users perform?
- Integrations: Which external systems need to connect?
- Security: Who should have access to what?
- Reporting: What reports/dashboards are needed?
Step 2: Generate Module Structure
Create all necessary files:
- manifest.py with dependencies and metadata
- models/ with Python classes for each entity
- views/ with XML definitions for UI
- security/ with access control rules
- data/ with default records
- README.md with usage instructions
Step 3: Add Business Logic
Implement:
- Field validations and constraints
- Computed fields
- CRUD operations
- Workflow automation
- API integrations
Step 4: Configure Security
Define:
- User groups
- Access rights (read, write, create, unlink)
- Record rules (domain-based access)
- Field-level security
Step 5: Create UI Views
Build:
- Form views (detail page)
- Tree views (list page)
- Kanban views (card layout)
- Search views (filters, group by)
- Dashboard widgets
Step 6: Testing & Deployment
- Local Testing:
odoo-bin -d test_db -i custom_module --test-enable
- Deploy to Odoo.sh:
git add custom_module/
git commit -m "Add custom module"
git push origin staging
- Install in Production:
- Test in staging branch first
- Merge to production branch
- Auto-deployment triggered
Best Practices
Code Quality
- Follow OCA Guidelines: Use Odoo Community Association standards
- Use Python Type Hints: Improve code readability
- Write Docstrings: Document all models and methods
- Add Unit Tests: Ensure reliability
- Validate XML: Check view definitions
Performance
- Optimize Queries: Use
_read_group()for aggregations - Lazy Loading: Use
@api.dependswisely - Index Database Fields: Add
index=Trueto frequently queried fields - Cache Computed Fields: Use
store=Truewhen appropriate
Security
- Never Trust User Input: Validate and sanitize
- Use Record Rules: Restrict data access by domain
- Encrypt Sensitive Data: Use
password=Truefor password fields - Audit Logging: Track important changes
- Rate Limiting: Prevent API abuse
Maintenance
- Version Control: Use git with semantic versioning
- Migration Scripts: Provide upgrade paths
- Backup Data: Regular database backups
- Monitor Logs: Watch for errors and performance issues
- Documentation: Keep README up-to-date
Common Pitfalls to Avoid
- Missing Dependencies: Always declare in
__manifest__.py - Hardcoded Values: Use configuration parameters instead
- No Access Rules: Module won't be accessible without security/ir.model.access.csv
- Circular Dependencies: Check module dependency graph
- Unused Fields: Don't add fields you won't use
- Poor Naming: Use clear, descriptive names
- Skipping Tests: Test before deploying to production
Integration with User's Stack
InsightPulse AI Infrastructure
Components:
- Odoo 19 ERP: Primary application (self-hosted with OCA modules)
- Apache Superset: BI dashboards (replaces Tableau, saves $4,728/year)
- Supabase: PostgreSQL database (project: spdtwktxdalcfigzeqrz)
- MCP Servers: Notion, Google Drive integration
- PaddleOCR: Receipt and BIR form processing
Module Integration Points:
- Connect to Supabase for centralized data
- Sync with Notion for task management
- Send analytics to Superset dashboards
- Process documents with PaddleOCR
- Store files in Google Drive
Multi-Agency Configuration
Support for 8 agencies:
- RIM, CKVC, BOM, JPAL, JLI, JAP, LAS, RMQB
Implementation:
class FinanceAgency(models.Model):
_name = 'finance.agency'
code = fields.Selection([
('RIM', 'RIM'),
('CKVC', 'CKVC'),
('BOM', 'BOM'),
('JPAL', 'JPAL'),
('JLI', 'JLI'),
('JAP', 'JAP'),
('LAS', 'LAS'),
('RMQB', 'RMQB'),
], required=True)
name = fields.Char(required=True)
tin = fields.Char(string='TIN')
rdo_code = fields.Char(string='RDO Code')
Output Format
When generating a module, provide:
- Complete Module ZIP: Ready to install in Odoo
- Installation Instructions: Step-by-step deployment guide
- Configuration Guide: How to set up after installation
- User Documentation: How to use the module
- Developer Notes: Architecture decisions and extension points
References
- Odoo 19 Developer Documentation
- Odoo.sh Containers Guide
- Odoo Studio Documentation
- Odoo Apps & Modules Management
- Odoo Upgrade Process
- OCA Guidelines
Built for Finance Shared Service Centers managing multi-agency operations with self-hosted infrastructure.