Mercado Libre Connector
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
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.
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.
Grant operators Mercado Libre / User and administrators Mercado Libre / Manager.
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.
Click Connect and authorize the seller. The backend stores the seller id returned by /users/me and the token pair.
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
Contributors
-
Maxime Chambreuil <maxime.chambreuil@graymatterlogic.com>
Maintainers
This module is maintained by the OCA.
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:
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)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| 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.