Odoo Community Association

Mercado Libre Connector - Products

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

Bind Mercado Libre listings to Odoo products and keep price and seller stock aligned.

Listings are matched by the SELLER_SKU attribute, then by seller_custom_field, then by the product internal reference. A listing that does not match stays unbound. Create missing products is off by default.

Price export uses the Mercado Libre Prices API. Stock export sends available_quantity for legacy items and PUT /user-products/{id}/stock/type/seller_warehouse when the backend version is User products. Fulfillment stock is read-only.

Important

This is an alpha version, the data model and design can change at any time without warning. Only for development or testing purpose, do not use in production. More details on development status

Table of contents

Installation

Install connector_mercadolibre first, then this module.

Map each seller warehouse on the backend before enabling Export stock. A warehouse mapped as fulfillment is displayed and is never updated from Odoo.

Configuration

  1. Open the Mercado Libre backend and the page Catalog.
  2. Enable Import listings, Export prices, and Export stock as needed.
  3. Add a line per Odoo warehouse: Mercado Libre store id, network node id, and stock type (seller_warehouse, selling_address, or fulfillment).
  4. Set Versions on the backend. After connect, the core fills this from the user_product_seller tag on /users/me. Keep User products for sellers already migrated.
  5. Run Import listings on the backend. Review unmatched rows under Mercado Libre / Catalog / Listings.
  6. Open a product and use the Mercado Libre smart button to see its bindings. Set the internal reference to the seller SKU before the next import if the first pass did not match.

Usage

A change to a product list price enqueues one price export for each binding of that product. A done stock move enqueues one stock export per binding and mapped warehouse. Both jobs use an identity key, so a burst of moves becomes a single pending job.

Mercado Libre / Catalog / Categories shows the cached category tree and the attribute schema used when a publisher component creates a listing. Refresh categories on the backend reloads that tree.

The notification topics items and stock-location update the binding. stock-location writes the last marketplace quantity on the binding and does not create stock.quant rows.

Development

Stock export is two components with usage stock.exporter. _component_match keeps the component for the backend version:

  • mercadolibre.product.exporter.stock.legacy writes available_quantity on PUT /items/{id} when Versions is Legacy items.
  • mercadolibre.product.exporter.stock.user_product writes PUT /user-products/{id}/stock/type/seller_warehouse (or selling_address) when Versions is User products.

A binding with an empty user_product_id uses the legacy call, including when the backend version is User products. Fulfillment bindings and fulfillment warehouse lines are skipped. The quantity is product.with_context(warehouse_id=warehouse).free_qty for that mapped warehouse only.

_apply_on has to be an Odoo model. The Mercado Libre topic is not a model, so the handlers set _topic to items or stock-location and _apply_on to mercadolibre.notification. The core dispatcher selects the handler by _topic.

mercadolibre.product.binder resolves a listing with to_internal(external_id, variation_id=...). An empty variation id is the item that has no variations. to_external returns the Mercado Libre item id.

Publishing a new listing is the component usage product.publisher. This module ships a publisher that raises UserError with “Listing publication is not installed.” A localization replaces that component with POST /items without changing price or stock export.

Import and export mappers are separate (import.mapper and export.mapper). The export mapper exposes price_payload, legacy_stock_payload, and user_product_stock_payload so a price body is never merged into a stock body.

Import jobs use the identity key meli:item:{backend_id}:{item_id}:. One job imports every variation of the item. Price jobs use meli:price:{backend_id}:{binding_id}. Stock jobs use meli:stock:{backend_id}:{binding_id}:{mapping_id}.

Known issues / Roadmap

  • Picture binary synchronization. The binding stores picture URLs.
  • Listing creation (product.publisher) with category attributes, listing types, and picture upload.
  • Price lists other than the product list price.
  • Multi-company stock rules beyond the warehouse map on the backend.

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

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.

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.