logo
Agent Skills

AIERP Plus

Odoo-based ERP system integration for managing sales orders, customers, and products

AIERP Plus Integration Setup Guide

The AIERP Plus integration provides two-way communication between AINexLayer agents and the Odoo-based AIERP Plus system.

Overview

Agents can:

  • Read ERP data (sales orders, partners, products)
  • Create new sales orders
  • Update existing sales orders
  • Confirm and Cancel sales orders
  • Delete draft sales orders
  • Check order status and fulfillment
  • Manage order lines and delivery addresses

Setup

Step 1: Copy Files

Copy the integration files to the active plugins directory:

# Linux/Mac
mkdir -p backend/storage/plugins/agent-skills/aierp-plus
cp -r path/to/aierp-plus/* backend/storage/plugins/agent-skills/aierp-plus/

# Windows (PowerShell)
New-Item -ItemType Directory -Force -Path "backend\storage\plugins\agent-skills\aierp-plus"
Copy-Item -Path "path\to\aierp-plus\*" -Destination "backend\storage\plugins\agent-skills\aierp-plus\" -Recurse -Force

Step 2: Configure OAuth Credentials

  1. Log in to AIERP Plus (Odoo) at http://localhost:8069
  2. Enable Developer Mode: SettingsActivate Developer Mode
  3. Create OAuth Applications: SettingsTechnicalOAuth Applications
  4. Create three OAuth applications (Admin, Manager, User roles)
  5. Copy Client ID and Client Secret for each

Step 3: Configure in AINexLayer

  1. Navigate to Workspace SettingsAgent Skills
  2. Find AIERPPlusLayer in the list
  3. Configure:
    • AIERP_BASE_URL: Base URL of your AIERP Plus instance (e.g., http://localhost:8069)
    • AIERP_ADMIN_CLIENT_ID: Admin OAuth Client ID
    • AIERP_ADMIN_CLIENT_SECRET: Admin OAuth Client Secret
    • AIERP_MANAGER_CLIENT_ID: Manager OAuth Client ID
    • AIERP_MANAGER_CLIENT_SECRET: Manager OAuth Client Secret
    • AIERP_USER_CLIENT_ID: User OAuth Client ID
    • AIERP_USER_CLIENT_SECRET: User OAuth Client Secret
  4. Save configuration

Step 4: Restart AINexLayer

Restart your AINexLayer server for changes to take effect.

Usage Examples

User: "Show me all sales orders"
AI: [Calls get_sales_orders and displays list]

User: "Create a sales order for ABC Industries: 50 units of product XYZ"
AI: [Calls create_sales_order and creates the order]

User: "What's the status of order SO-5634?"
AI: [Calls check_order_status and displays status]

User: "Confirm order SO-5634"
AI: [Calls confirm_sales_order and confirms the order]

Available Operations

Sales Orders

  • get_sales_orders - List all sales orders (can filter by state)
  • get_sales_order - Get specific sales order details by ID
  • create_sales_order - Create a new sales order
  • update_sales_order - Update an existing sales order
  • update_sales_order_quantity - Update quantity in a sales order
  • confirm_sales_order - Confirm a sales order (draft → sale)
  • cancel_sales_order - Cancel a sales order
  • delete_sales_order - Delete a draft sales order

Order Management

  • get_sale_order_lines - Get all order lines
  • add_product_to_order - Add a product to an existing order
  • find_orders_by_customer - Find all orders for a specific customer
  • check_order_status - Check the current status of an order
  • check_order_fulfillment - Check if an order can be fulfilled by a date
  • update_delivery_address - Update delivery address for an order

Troubleshooting

Error: "ERP OAuth credentials missing for role"

  • Check that all environment variables are set
  • Verify variable names are correct (case-sensitive)
  • Restart AINexLayer server after updating configuration

Error: "Failed to authenticate with ERP"

  • Verify Client ID and Client Secret are correct
  • Check that OAuth applications exist in AIERP Plus
  • Ensure OAuth applications have correct scopes
  • Verify AIERP_BASE_URL is correct and accessible

Error: "Connection Refused"

  • Verify AIERP_BASE_URL is correct
  • Check if AIERP Plus is running on port 8069
  • If using Docker, ensure containers are on the same network

On this page