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 -ForceStep 2: Configure OAuth Credentials
- Log in to AIERP Plus (Odoo) at
http://localhost:8069 - Enable Developer Mode: Settings → Activate Developer Mode
- Create OAuth Applications: Settings → Technical → OAuth Applications
- Create three OAuth applications (Admin, Manager, User roles)
- Copy Client ID and Client Secret for each
Step 3: Configure in AINexLayer
- Navigate to Workspace Settings → Agent Skills
- Find AIERPPlusLayer in the list
- 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
- AIERP_BASE_URL: Base URL of your AIERP Plus instance (e.g.,
- 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 IDcreate_sales_order- Create a new sales orderupdate_sales_order- Update an existing sales orderupdate_sales_order_quantity- Update quantity in a sales orderconfirm_sales_order- Confirm a sales order (draft → sale)cancel_sales_order- Cancel a sales orderdelete_sales_order- Delete a draft sales order
Order Management
get_sale_order_lines- Get all order linesadd_product_to_order- Add a product to an existing orderfind_orders_by_customer- Find all orders for a specific customercheck_order_status- Check the current status of an ordercheck_order_fulfillment- Check if an order can be fulfilled by a dateupdate_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_URLis correct and accessible
Error: "Connection Refused"
- Verify
AIERP_BASE_URLis correct - Check if AIERP Plus is running on port 8069
- If using Docker, ensure containers are on the same network
