# BMAD-ODOO-DEV: Odoo Development Expansion Pack

[![Version](https://img.shields.io/npm/v/bmad-odoo-dev?color=blue&label=version)](https://www.npmjs.com/package/bmad-odoo-dev)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
[![BMAD-METHOD](https://img.shields.io/badge/BMAD--METHOD-v4.30%2B-brightgreen)](https://github.com/bmadcode/bmad-method)
[![Odoo](https://img.shields.io/badge/Odoo-13%2B-purple)](https://www.odoo.com)

**Các AI agents chuyên biệt cho phát triển Odoo ERP sử dụng framework BMAD-METHOD với các mẫu cộng đồng OCA.**

## Overview

BMAD-ODOO-DEV extends the powerful BMAD-METHOD framework with comprehensive Odoo-specific expertise, transforming your AI agents into specialized Odoo development consultants. Perfect for brownfield projects, addon development, and enterprise Odoo customizations.

## Key Features

### 🎯 **Odoo-Specialized AI Agents**
- **Odoo Analyst**: Business process analysis and requirements gathering
- **Odoo Architect**: System architecture and technical design
- **Odoo Developer**: Implementation and coding guidance
- **Odoo PM**: Project management and planning
- **Odoo QA**: Quality assurance and testing
- **Odoo SM**: Scrum master and agile coordination

### 🔧 **Comprehensive Workflows**
- **Addon Creation**: From business requirement to deployable addon
- **System Enhancement**: Extending existing Odoo installations safely
- **Migration Planning**: Structured approach to version upgrades
- **Epic Creation**: Large-scale feature planning
- **Story Sharding**: Breaking down complex requirements
- **Quick Deploy**: Triển khai nhanh Odoo

### 📋 **Odoo-Specific Templates**
- **Odoo PRD Template**: Business process focused requirements
- **Odoo Architecture Template**: Technical specifications for modules
- **Odoo Story Template**: Development task templates
- **Odoo Epic Template**: Large feature planning
- **Quick Addon Template**: Rapid addon creation

### 🏗️ **Tích Hợp OCA**
- OCA (Odoo Community Association) best practices and guidelines
- Multi-database, multi-company environment support
- Community addon integration and contribution workflows

## Quick Start

### Prerequisites

- Node.js v16+ (BMAD-METHOD core will be installed automatically)
- Existing Odoo project (recommended) or new project setup

### Installation

```bash
# Install the expansion pack
npm install bmad-odoo-dev

# Install into BMAD-METHOD
npx bmad-odoo install
```

That's it! This single command will:
- Detect your existing BMAD-METHOD project
- Install BMAD-METHOD core if needed
- **Integrate 6+ Odoo agents** into `.bmad-core/agents/`
- **Add 9 Odoo tasks** to `.bmad-core/tasks/`  
- **Add 5 Odoo templates** to `.bmad-core/templates/`
- **Update configuration** in `core-config.yaml`

## Usage

### 1. Agent Integration (Automatic)

After installation, Odoo agents are **automatically available** in your BMAD-METHOD project:

**Available Agents:**
- `*odoo-analyst` - Business process analysis and requirements
- `*odoo-architect` - System architecture and technical design  
- `*odoo-developer` - Implementation and coding guidance
- `*odoo-pm` - Project management and planning
- `*odoo-qa` - Quality assurance and testing
- `*odoo-sm` - Scrum master and agile coordination

### 2. Development Workflow

The expansion pack fully supports Odoo addon development with specialized tasks:

**Available through `*BMadOdooDev` slash prefix:**
- `*BMadOdooDev create-addon` - Complete addon generation from business requirements
- `*BMadOdooDev enhance-existing` - Brownfield system enhancements  
- `*BMadOdooDev plan-migration` - Version upgrade planning
- `*BMadOdooDev create-epic` - Large feature planning
- `*BMadOdooDev quick-addon` - Rapid addon creation

## Supported Odoo Environments

### ✅ Fully Supported
- **Docker-based deployments**
- **OCA community addons** integration
- **Multi-database environments** (production pattern)
- **Odoo versions**: 13.0, 14.0, 15.0, 16.0, 17.0, 18.0

### 🎯 Specialized For
- **Brownfield projects** - Existing Odoo installations
- **Enterprise customizations** - Complex business requirements
- **Multi-company setups** - Operating unit management
- **Community contributions** - OCA-compliant addon development

## CLI Commands

```bash
# Install expansion pack
npx bmad-odoo install

# Validate installation
npx bmad-odoo validate

# List available agents
npx bmad-odoo agents

# List team files
npx bmad-odoo team-files
```

## Architecture Integration

### With BMAD-METHOD Core
BMAD-ODOO-DEV seamlessly integrates with the core framework:

- **Inherits** all core BMAD agents (PM, QA, SM)
- **Extends** planning and development workflows with Odoo expertise
- **Maintains** compatibility with core BMAD updates
- **Preserves** existing BMAD project configurations

### Odoo Environment Integration
Works perfectly with your existing Odoo setup:

- **Detects** Odoo project structure automatically
- **Integrates** with invoke task workflows
- **Supports** multiple database environments
- **Follows** OCA development patterns

## Best Practices

### For Odoo Development
- **Always use inheritance** over direct modification
- **Follow OCA patterns** for community compatibility
- **Test in isolated environments** before production
- **Document business logic** in functional specifications

### For BMAD Integration
- **Start with PRD creation** using Odoo Analyst
- **Use architecture phase** for complex integrations
- **Leverage story sharding** for development organization
- **Follow BMAD development cycle** for consistency

## Troubleshooting

### Common Issues

**Expansion pack not recognized:**
```bash
# Ensure proper installation
npm list bmad-odoo-dev
npx bmad-odoo validate
```

**Odoo commands not available:**
```bash
# Check slash prefix configuration
grep -r "BMadOdooDev" node_modules/bmad-odoo-dev/
```

**Deployment integration issues:**
```bash
# Verify project structure
ls -la docker-compose.yml common.yaml repos.yaml
```

## Contributing

We welcome contributions to improve Odoo development workflows:

1. **Fork the repository**
2. **Create feature branch**: `git checkout -b feature/odoo-enhancement`
3. **Add Odoo-specific agents/tasks/templates**
4. **Test with real Odoo projects**
5. **Submit pull request**

## License

MIT License - see [LICENSE](LICENSE) for details.

## Credits & Acknowledgments

This expansion pack extends and builds upon several amazing open-source projects:

### Core Framework
- **[BMAD-METHOD](https://github.com/bmadcode/bmad-method)** by **Brian (BMad) Madison** - The foundational AI-driven development framework

### Odoo Ecosystem
- **[Odoo](https://www.odoo.com)** by **Odoo SA** - The comprehensive open-source ERP platform
- **[Odoo Community Association (OCA)](https://odoo-community.org)** - Community-driven best practices

---

<sub>Built with ❤️ for the Odoo development community, extending the powerful BMAD-METHOD framework</sub>

