Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Guide for implementing EDI (Electronic Data Interchange) with Odoo: X12, EDIFACT document mapping, partner onboarding, and automated order processing.
.claude/skills/odoo-edi-connector/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-10 | ✗→✓ | ▲ Improved | — | — |
| case-01 | ✗→✓ | ▲ Improved | — | — |
| case-19 | ✗→✓ | ▲ Improved | — | — |
| case-11 | ✓→✓ | = Same ✓ | — | — |
| case-04 | ✗→✗ | = Same ✗ | — | — |
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.
@odoo-edi-connector and specify the EDI transaction set and trading partner.| 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 |
pythonfrom 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, }])
pythondef generate_997(isa_control, gs_control, transaction_control): """Generate a functional acknowledgment for received EDI""" today = datetime.now().strftime('%y%m%d') return f"""ISA*00* *00* *ZZ*YOURISAID *ZZ*PARTNERISAID *{today}*1200*^*00501*{isa_control}*0*P*>~ GS*FA*YOURGID*PARTNERGID*{today}*1200*{gs_control}*X*005010X231A1~ ST*997*0001~ AK1*PO*{gs_control}~ AK9*A*1*1*1~ SE*4*0001~ GE*1*{gs_control}~ IEA*1*{isa_control}~"""
T.| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-04 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-12 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-06 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-03 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-14 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-05 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-23 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-07 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-11 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-10 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-17 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-16 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-13 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-01 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-22 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-19 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-15 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-20 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-02 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-09 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-18 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-08 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-21 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of +13 percentage points is the difference between those two pass rates over the 23 comparable cases.
The per-case answers from this run were removed by the retention sweep, so the case table below shows the verdicts without the text either arm produced. The counts above were recorded at the time and are unaffected. Answers are now kept for 180 days.
Other measured skills in the registry, with their headline benchmark lift.