Ir al contenido
Odoo Menú
  • Inicia sesión
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • PdV para tiendas
    • PdV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en vivo
    • eLearning
    Cadena de suministro
    • Inventario
    • Manufactura
    • PLM
    • Compras
    • Mantenimiento
    • Calidad
    Recursos humanos
    • Empleados
    • Reclutamiento
    • Vacaciones
    • Evaluaciones
    • Referencias
    • Flotilla
    Marketing
    • Redes sociales
    • Marketing por correo
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyectos
    • Registro de horas
    • Servicio externo
    • Soporte al cliente
    • Planeación
    • Citas
    Productividad
    • Conversaciones
    • Inteligencia artificial
    • IoT
    • VoIP
    • Artículos
    • WhatsApp
    Aplicaciones externas Studio de Odoo Plataforma de Odoo en la nube
  • Industrias
    Venta minorista
    • Librería
    • Tienda de ropa
    • Mueblería
    • Tienda de abarrotes
    • Ferretería
    • Juguetería
    Alimentos y hospitalidad
    • Bar y pub
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidora de bebidas
    • Hotel
    Bienes inmuebles
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión de propiedades
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Firma contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Manufactura
    • Textil
    • Metal
    • Muebles
    • Comida
    • Cervecería
    • Regalos corporativos
    Salud y ejercicio
    • Club deportivo
    • Óptica
    • Gimnasio
    • Especialistas en bienestar
    • Farmacia
    • Peluquería
    Trades
    • Personal de mantenimiento
    • Hardware y soporte de TI
    • Sistemas de energía solar
    • Zapateros y fabricantes de calzado
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin fines de lucro
    • Agencia para la protección del medio ambiente
    • Alquiler de anuncios publicitarios
    • Fotografía
    • Alquiler de bicicletas
    • Distribuidor de software
    Descubre todas las industrias
  • Comunidad
    Aprende
    • Tutoriales
    • Documentación
    • Certificaciones
    • Capacitación
    • Blog
    • Podcast
    Fortalece la educación
    • Programa educativo
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtén el software
    • Descargar
    • Compara ediciones
    • Versiones
    Colabora
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Conviértete en partner
    • Servicios para partners
    • Registra tu firma contable
    Obtén servicios
    • Encuentra un partner
    • Encuentra un contador
    • Contacta a un consultor
    • Servicios de implementación
    • Referencias de clientes
    • Soporte
    • Actualizaciones
    GitHub YouTube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicita una demostración
  • Precios
  • Ayuda
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Ayuda

Integrate Odoo with third party APIs

Suscribirse

Reciba una notificación cuando haya actividad en esta publicación

Se marcó esta pregunta
integrationapi
3 Respuestas
672 Vistas
Avatar
vadawos

Hi   experts,


I am new to the ODOO world. I. have a requirement to integrate third party Invoices ODOO Invoices and  third Sales orders with ODOO sales orders using  the REST APIs.


Can you please guide me ?


Warm regards,

WILLION

0
Avatar
Descartar
Avatar
Sandeep Paulraj R
Mejor respuesta

Hi Willion,

Welcome to the Odoo community!

Integrating third-party invoices and sales orders with Odoo through REST APIs is a common requirement and can be implemented in several ways depending on the external system.

A typical integration flow would be:

  1. Analyze the Third-Party API

    • Review the API documentation.

    • Identify authentication methods (API Key, OAuth, Bearer Token, etc.).

    • Understand the request/response formats (usually JSON).

  2. Create a Custom Odoo Module

    • Develop a custom module to handle the integration logic.

    • Use Python libraries such as requests to communicate with the external API.

  3. Map External Data to Odoo Models

    • Sales Orders → sale.order

    • Invoices → account.move

    • Customers → res.partner

    • Products → product.product

  4. Implement Synchronization

    • Import data from the external system into Odoo.

    • Optionally export Odoo records back to the external system.

    • Use scheduled actions (Cron Jobs) for automatic synchronization.

  5. Handle Errors and Logging

    • Store API responses and errors for troubleshooting.

    • Implement retry mechanisms for failed requests.

Example (REST API call from Odoo):

import requests

response = requests.get(
    "https://api.example.com/orders",
    headers={"Authorization": "Bearer YOUR_TOKEN"}
)

data = response.json()

If you can share:

  • Your Odoo version

  • The third-party system name

  • Whether the integration is one-way or two-way

the community can provide more specific guidance and examples.

Best regards,
Sandeep Paulraj

0
Avatar
Descartar
Avatar
Atliis 360
Mejor respuesta

Hi,

Yes, this is definitely achievable! Here's the general approach for syncing third-party invoices and sales orders into Odoo via REST API:

1. Authenticate first:

import requests

session = requests.Session()
response = session.post('https://your-odoo.com/web/dataset/call_kw', json={
    "jsonrpc": "2.0",
    "method": "call",
    "params": {
        "model": "res.users",
        "method": "authenticate",
        "args": ["your-db", "admin@example.com", "password", {}],
        "kwargs": {}
    }
})
uid = response.json().get("result")

2. Create a Sales Order (sale.order):

session.post('https://your-odoo.com/web/dataset/call_kw', json={
    "jsonrpc": "2.0",
    "method": "call",
    "params": {
        "model": "sale.order",
        "method": "create",
        "args": [{"partner_id": 1, "order_line": [(0, 0, {
            "product_id": 5,
            "product_uom_qty": 2,
            "price_unit": 100.0
        })]}],
        "kwargs": {}
    }
})

3. Create an Invoice (account.move):

session.post('https://your-odoo.com/web/dataset/call_kw', json={
    "jsonrpc": "2.0",
    "method": "call",
    "params": {
        "model": "account.move",
        "method": "create",
        "args": [{"move_type": "out_invoice", "partner_id": 1, "invoice_line_ids": [(0, 0, {
            "name": "Service",
            "quantity": 1,
            "price_unit": 200.0
        })]}],
        "kwargs": {}
    }
})

For duplicate prevention, always search for an existing record before creating:

# Check if order already exists by external reference
session.post('...call_kw', json={
    "params": {
        "model": "sale.order",
        "method": "search_read",
        "args": [[["client_order_ref", "=", "EXT-ORDER-123"]]],
        "kwargs": {"fields": ["id"], "limit": 1}
    }
})

If you want to avoid the JSON-RPC boilerplate and work with a cleaner REST interface, REST API Toolkit (available on the Odoo App Store for Odoo 19) lets you do all of this with simple GET/POST/PATCH/DELETE endpoints and Bearer token auth — much easier to integrate with third-party platforms.

Hope that helps!

0
Avatar
Descartar
Avatar
Olagbaju Olamide
Mejor respuesta

Hi Willion,

Yes, this is possible using Odoo REST/XML-RPC APIs or custom API endpoints depending on your Odoo version and integration requirements.

For your use case, the process usually involves:

  • Authenticating with the Odoo API

  • Mapping third-party invoice and sales order data

  • Creating/updating records in Odoo (sale.order and account.move)

  • Handling customer/product synchronization

  • Managing error handling and duplicate prevention

The best approach depends on:

  • your Odoo version,

  • the third-party system you want to connect,

  • and whether the sync should be real-time or scheduled.

If you can share a few more details about the external platform/API you are integrating with, I can guide you more specifically.

0
Avatar
Descartar
¿Le interesa esta conversación? ¡Participe en ella!

Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.

Registrarse
Publicaciones relacionadas Respuestas Vistas Actividad
Integrate Odoo with third party APIs
integration api
Avatar
Avatar
1
ago 24
10117
Integrating Odoo with external system
integration api
Avatar
Avatar
Avatar
2
may 22
16280
How to call external API/web service from inherited module in odoo 12?
integration api
Avatar
0
ene 21
1949
I want to integrate my custom store with openERP
integration api
Avatar
0
mar 15
5009
record rules filters res.partner but still reports pop error accessing res.users
security integration api
Avatar
0
jun 26
745
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento en Odoo.sh
  • Soporte
  • Actualizaciones del software
  • Desarrollos personalizados
  • Educación
  • Encuentra un contador
  • Encuentra un partner
  • Conviértete en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contáctanos
  • Empleos
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Legal • Privacidad
  • Seguridad
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk Slovenščina Español (América Latina) Español Svenska ภาษาไทย Türkçe українська Tiếng Việt

Odoo es un conjunto de aplicaciones de código abierto que cubren todas las necesidades de tu empresa: CRM, comercio electrónico, contabilidad, inventario, punto de venta, gestión de proyectos, etc.

La propuesta única de valor de Odoo es ser muy fácil de usar y estar totalmente integrado.

Sitio web hecho con

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now