Skip to content
Skillpedia
APIs & servers (backend)48k · #3724

odoo-edi-connector

Lets your agent connect Odoo with other companies using EDI. It automates sending and receiving important documents.

What it does

This guide helps you set up automatic exchange of business documents (like orders and invoices) between your company and partners, using a standard called EDI. It shows how to connect this to the Odoo system.

When to use it

  • ✓When a retail partner requires you to use EDI to do business.
  • ✓To automatically send shipping notices when products go out.
  • ✓To automatically generate invoices from confirmed deliveries in Odoo.

Example of what to ask your AI

“Help me set up EDI to receive purchase orders from partner X in Odoo.”

Want more? Open the sections below.

How to use

The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.

Skill link

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/odoo-edi-connector/SKILL.md

Ready-to-paste message

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/odoo-edi-connector/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
How it works

You tell me which EDI document type you want to use and with which partner. I'll give you instructions to map EDI fields to Odoo fields and code to automate the process.

Installation

Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.

In the terminal (Claude Code, Codex, Cursor), in your project folder:

npx skills add sickn33/agentic-awesome-skills --skill odoo-edi-connector

Or download just the file:

curl -L https://raw.githubusercontent.com/sickn33/agentic-awesome-skills/main/plugins/agentic-awesome-skills-claude/skills/odoo-edi-connector/SKILL.md -o SKILL.md
Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Odoo EDI Connector

Overview

Electronic Data Interchange (EDI) is the standard for automated B2B document exchange — purchase orders, invoices, ASNs (Advance Shipping Notices). This skill guides you through mapping EDI transactions (ANSI X12 or EDIFACT) to Odoo business objects, setting up trading partner configurations, and automating inbound/outbound document flows.

When to Use This Skill

  • A retail partner requires EDI 850 (Purchase Orders) to do business with you.
  • You need to send EDI 856 (ASN) when goods are shipped.
  • Automating EDI 810 (Invoice) generation from Odoo confirmed deliveries.
  • Mapping EDI fields to Odoo fields for a new trading partner.

How It Works

  1. Activate: Mention @odoo-edi-connector and specify the EDI transaction set and trading partner.
  2. Map: Receive a complete field mapping table between EDI segments and Odoo fields.
  3. Automate: Get Python code to parse incoming EDI files and create Odoo records.

EDI ↔ Odoo Object Mapping

EDI Transaction Odoo Object
850 Purchase Order sale.order (inbound customer PO)
855 PO Acknowledgment Confirmation email / SO confirmation
856 ASN (Advance Ship Notice) stock.picking (delivery order)
810 Invoice account.move (customer invoice)
846 Inventory Inquiry product.product stock levels
997 Functional Acknowledgment Automated receipt confirmation

Examples

Example 1: Parse EDI 850 and Create Odoo Sale Order (Python)

from pyx12 import x12file  # pip install pyx12
from datetime import datetime

import xmlrpc.client
import os

odoo_url = os.getenv("ODOO_URL")
db = os.getenv("ODOO_DB")
pwd = os.getenv("ODOO_API_KEY") 
uid = int(os.getenv("ODOO_UID", "2"))

models = xmlrpc.client.ServerProxy(f"{odoo_url}/xmlrpc/2/object")

def process_850(edi_file_path):
    """Parse X12 850 Purchase Order and create Odoo Sale Order"""
    with x12file.X12File(edi_file_path) as f:
        for transaction in f.get_transaction_sets():
            # Extract header info (BEG segment)                     
            po_number = transaction['BEG'][3]    # Purchase Order Number                                                    
            po_date   = transaction['BEG'][5]    # Purchase Order Date 

            # IDEMPOTENCY CHECK: Verify PO doesn't already exist in Odoo
            existing = models.execute_kw(db, uid, pwd, 'sale.order', 'search', [
                [['client_order_ref', '=', po_number]]
            ])
            if existing:
                print(f"Skipping: PO {po_number} already exists.")
                continue 

            # Extract partner (N1 segment — Buyer)


                        # Extract partner (N1 segment — Buyer)                  
            partner_name = transaction.get_segment('N1')[2] if transaction.get_segment('N1') else "Unknown"                                                                             
            
            # Find partner in Odoo                                  
            partner = models.execute_kw(db, uid, pwd, 'res.partner', 'search',                                                  
                                [[['name', 'ilike', partner_name]]])                
            
            if not partner:
                print(f"Error: Partner '{partner_name}' not found. Skipping transaction.")
                continue
                
            partner_id = partner[0]

            # Extract line items (PO1 segments)
            order_lines = []
            for po1 in transaction.get_segments('PO1'):
                sku     = po1[7]    # Product ID
                qty     = float(po1[2])
                price   = float(po1[4])

                product = models.execute_kw(db, uid, pwd, 'product.product', 'search',
                    [[['default_code', '=', sku]]])
                if product:
                    order_lines.append((0, 0, {
                        'product_id': product[0],
                        'product_uom_qty': qty,
                        'price_unit': price,
                    }))

            # Create Sale Order
            if partner_id and order_lines:
                models.execute_kw(db, uid, pwd, 'sale.order', 'create', [{
                    'partner_id': partner_id,
                    'client_order_ref': po_number,
                    'order_line': order_lines,
                }])

Example 2: Send EDI 997 Acknowledgment


…
FAQ

What is EDI?

EDI (Electronic Data Interchange) is a standardized way for businesses to exchange business documents electronically, such as purchase orders and invoices.

What are X12 and EDIFACT?

These are the two most common EDI standards used globally to structure the information within documents.

What is a 'trading partner'?

It's the other company with which you are exchanging documents via EDI.

Details

Original description by the author

Guide for implementing EDI (Electronic Data Interchange) with Odoo: X12, EDIFACT document mapping, partner onboarding, and automated order processing.

repo: sickn33/agentic-awesome-skills

Popularity

GitHub stars
48k
Ranking position
#3724
License
MIT
Updated
10/15/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills