Skip to content

Perry-Multi-LLM/testing-odoo

Repository files navigation

Testing Odoo: Perry ERP Environment

Odoo Python PostgreSQL Docker

Testing Odoo is the dedicated ERP environment and frontend interface for Perry, our multi-agent AI orchestrator.

This repository contains a containerized Odoo 17 instance pre-configured with a suite of custom addons. It handles user interactions via the Discuss app, captures real-time webhooks, enforces Human-in-the-Loop (HITL) validations and acts as the database backend for the AI's Model Context Protocol (MCP) tools.


Documentation

Detailed documentation for the architecture, standards and specific features of this Odoo environment can be found in these directories:

  • Traceability & Observability Guide: A complete manual on how Pydantic Logfire is used across the ecosystem, including setup instructions, code instrumentation standards and how to navigate the live dashboard.

Custom Addons Ecosystem

The system is extended through a modular architecture located in the custom_addons/ directory:

  • perry_auto_reply: A lightweight auto-responder for private Odoo channels. It intercepts incoming messages directed at the AI and instantly replies with a placeholder acknowledgment, providing immediate user feedback before the complex AI generation finishes.

  • perry_webhook: Captures messages from Odoo's chat interface, displays real-time typing indicators and forwards payloads to the FastAPI brain via background threads.

  • perry_human_loop: Intercepts critical actions (e.g., payments, leads) proposed by the AI and creates a pending action queue for mandatory human validation before execution.


Key features

  • Seamless AI UX: Real-time WebSocket integration ensuring users see instant AI responses without page reloads.
  • Secure execution: The backend acts as a strict gatekeeper. No AI agent can write critical data to the database without triggering the Human-in-the-Loop confirmation pipeline.
  • End-to-End traceability: Fully integrated with Pydantic Logfire to trace the complete lifecycle of webhook events and internal Odoo model logic.
  • Ready-to-Use Docker stack: Bundled with Odoo and PostgreSQL for an immediate plug-and-play development experience.

Code Quality & Standards

We maintain a rigorous quality standard across all custom Odoo addons:

  • Linting & Formatting: Clean Python code guaranteed by ruff and standard Odoo guidelines.
  • Observability: Strict rules for contextual spans and error handling inside Odoo's @api.model decorators.
  • Isolation: No hardcoded paths; all inter-module dependencies are explicitly declared in __manifest__.py files.

Installation and deployment

This environment works in tandem with the ingest-api (Perry's brain). Both must run on the same Docker network to communicate effectively.

1. Network preparation

Create the shared Docker network to allow communication between Odoo and the AI APIs:

docker network create perry-network

2. Odoo setup (testing-odoo)

Clone this repository, configure your environment variables and launch the ERP:

git clone https://github.com/Perry-Multi-LLM/testing-odoo
cd testing-odoo

Create a .env file from the example (ensure LOGFIRE_TOKEN is set for observability), then build the containers:

docker-compose up -d --build

Odoo will be available at http://localhost:8069.

3. Connect to Perry (ingest-api)

To complete the system, deploy the orchestrator repository:

cd ..
git https://github.com/Perry-Multi-LLM/ingest-api
cd ingest-api
docker-compose up -d --build

4. Link containers to the network

Attach both running instances to the shared network:

docker network connect perry-network testing-odoo
docker network connect perry-network ingest-api

Initial Odoo Configuration

Follow these steps to synchronize the ERP environment with the Perry multi-agent system after your containers are running:

1. Database Initialization

The first time you access http://localhost:8069, Odoo will prompt you to create a new database.

  • Fill in the master password, database name,admin credentials, language and country. It is important to set the language to English.
  • Wait for the initialization process to complete; this sets up the core PostgreSQL schema.

2. Enable Developer Mode

To manage technical settings and custom module installation, you must activate Developer Mode:

  • Navigate to Settings.
  • Scroll to the bottom of the page.
  • Click on Activate the developer mode.

3. Create the Perry Service User

The AI system identifies itself through a specific user record. You must create this profile to allow the webhook logic to function correctly:

  • Go to Settings > Users & Companies > Users.
  • Click New to create a user.
  • Name: Perry
  • Email (Login): perry@perry.com

Important

The email must be exactly perry@perry.com. The perry_webhook logic uses this specific string to filter messages and prevent infinite loops.

4. Custom Addon Activation

The Perry ecosystem relies on external custom addons located in the custom_addons/ directory. To activate them:

  • Navigate to the Apps menu.
  • Click on Update Apps List in the top navigation bar.
  • Search for perry in the search bar (remove the default "Apps" filter if no results appear).
  • Install Perry Webhook and Perry Human Loop.

About

Odoo instance serving as Perry's ERP backend. Features three custom addons: perry_webhook (message capture + forwarding to FastAPI), perry_auto_reply (instant acknowledgment UX) and perry_human_loop (HITL staging queue). Fully instrumented with Pydantic Logfire for end-to-end traceability.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors