Skip to main content
Odoo Community Association

Mercado Libre Connector

Alpha License: AGPL-3 OCA/connector-mercadolibre Translate me on Weblate Try me on Runboat

Connect an Odoo company to a Mercado Libre seller account.

This is the core of the connector. It stores the seller backend, authorizes the application with OAuth 2.0, refreshes access tokens, and receives Mercado Libre notifications. Listing, stock, and sale synchronization live in connector_mercadolibre_product and connector_mercadolibre_sale.

A notification is stored and acknowledged in the HTTP request. The work runs afterwards in an OCA queue job.

Table of contents

Installation

Install this module together with OCA connector 19.0. connector depends on component, component_event, and queue_job.

The HTTP client uses the Python package requests.

Enable the job runner. In odoo.conf:

[queue_job]
channels = root:2,root.mercadolibre.import:2,root.mercadolibre.export:1,root.mercadolibre.webhook:2

Start Odoo with --load=base,web,queue_job and more than one worker.

Configuration

  1. Create an application in Mercado Libre (My Applications) with write scope and a redirect URI that points at this database, for example https://example.com/mercadolibre/oauth/callback.

  2. Set the notification callback to https://example.com/mercadolibre/notification/<backend-database-id>. Subscribe the topics the installed addons handle. The core stores every topic; product and sale addons consume items, stock-location, orders_v2, shipments, and payments.

  3. Grant operators Mercado Libre / User and administrators Mercado Libre / Manager.

  4. Open Mercado Libre / Configuration / Backends, create a backend, set the company, the site (MLA, MLB, MLM, …), the client id, the client secret, and the redirect URI.

  5. Click Connect and authorize the seller. The backend stores the seller id returned by /users/me and the token pair.

  6. A scheduled action refreshes the access token before the six-hour expiry. When Mercado Libre rejects the refresh token, the backend moves to Error and an administrator reconnects the seller.

Usage

Open Mercado Libre / Operations / Notifications to see the callbacks Mercado Libre has posted. Each row is dispatched by a job on the root.mercadolibre.webhook channel.

A topic with no installed handler is marked Skipped. Installing a later addon adds a handler component; the controller stays unchanged.

Refresh token on the backend asks Mercado Libre for a new access token immediately. Disconnect deletes the stored tokens.

Development

The backend model mercadolibre.backend is the component collection. Dispatch loads every component with usage notification.handler on mercadolibre.notification and keeps the one whose _topic equals the payload topic. A handler with an empty _topic marks the notification skipped.

_apply_on has to be an Odoo model name. The Mercado Libre topic is not a model, so a later addon selects its topic with _topic.

Register a handler for one topic in another addon:

class OrderNotificationHandler(Component):
    _name = "mercadolibre.notification.handler.orders"
    _inherit = "mercadolibre.notification.handler"
    _apply_on = "mercadolibre.notification"
    _usage = "notification.handler"
    _topic = "orders_v2"

    def handle(self):
        notification = self.work.notification
        ...

The HTTP adapter usage is backend.adapter. Child adapters inherit mercadolibre.adapter and set the resource path. Token refresh takes a row lock on the backend because the refresh token is single-use.

Set QUEUE_JOB__NO_DELAY=1 to run jobs inline while developing.

Known issues / Roadmap

  • connector_mercadolibre_product binds listings and exports price and seller-warehouse stock.

  • connector_mercadolibre_sale imports orders, packs, and shipments.

  • Questions, claims, shipping labels, promotions, payouts, country fiscal documents, and Global Selling (/marketplace) are further addons. Each one adds components and does not change this controller.

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.

Do not contact contributors directly about support or help with technical issues.

Credits

Authors

  • Gray Matter Logic

Contributors

Maintainers

This module is maintained by the OCA.

Odoo Community Association

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

Current maintainer:

max3903

This module is part of the OCA/connector-mercadolibre project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

Metadata

Release files for odoo-addon-connector-mercadolibre 19.0.1.0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for odoo-addon-connector-mercadolibre 19.0.1.0.0.6
File Interpreter ABI Platform Actions
odoo_addon_connector_mercadolibre-19.0.1.0.0.6-py3-none-any.whl Python 3 none any Details for odoo_addon_connector_mercadolibre-19.0.1.0.0.6-py3-none-any.whl

Release files / odoo_addon_connector_mercadolibre-19.0.1.0.0.6-py3-none-any.whl

Download URL odoo_addon_connector_mercadolibre-19.0.1.0.0.6-py3-none-any.whl
Size 63.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3047fcb17a86384bf1511b7888da24bc59a6aced3a10c2ca7d1a7a0dadf76825
BLAKE2b-256 checksum
How to use checksums
f8a2de42a16b1c2e30e4f622416f265888f60a6f6b27862ee3bb2876059b98fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Security for odoo-addon-connector-mercadolibre 19.0.1.0.0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page