Product barcode lookup

Auto-fill product data from barcodes through the barcodelookup.com API, with quick enrichment and bulk image fetching.

The product_barcodelookup module connects Odoo to barcodelookup.com so product data can be retrieved from UPC or EAN barcodes. When the barcode is valid and the API key is configured, the system can automatically enrich product names, images, weight, descriptions, categories, and several common attributes.

This is especially useful when the business imports many new products and wants to speed up basic data entry for product or warehouse teams.

Barcode Lookup
UPC
EAN
API
Product Images
Auto Fill

Business value

Key points

  • • Automatically fill product names, images, weight, reference sales price, descriptions, and categories from barcode data.

  • • Create product attributes such as color, size, brand, or material when the source response includes them.

  • • Support a bulk-image wizard for products that have barcodes but no product image yet.

  • • Use CRON-based background batches, which is suitable for large product sets and daily API limits.

  • • Reduce manual-entry effort when operations teams need to onboard many new products quickly.


Important fields and messages

FieldsTrường dữ liệuDescription
Barcode DatabaseCơ sở dữ liệu mã vạchSettings area where the API key is entered.
API KeyMã khóa APIAuthentication key stored in system configuration.
Get Pictures from Barcode LookupLấy ảnh từ Tìm kiếm mã vạchAction used to fetch product images in bulk.
Is Image Fetch PendingĐang chờ tìm nạp hình ảnhFlag showing the product is queued for background image fetching.
Products are processed in the backgroundSản phẩm đang được xử lý trong nềnMessage shown after the wizard delegates remaining work to CRON.
The Barcode Lookup API key is not set properly or it is invalidKhóa API Tìm kiếm mã vạch không hợp lệCommon error when the API key is missing, invalid, or expired.

API key setup

Key points

  • • Free plans commonly have a limit of 1000 requests per day.

  • • If there is no valid API key, the wizard blocks processing and points the user back to Settings.

Steps

  • 1. Create an account on barcodelookup.com and obtain an API key.

  • 2. Go to Settings → General Settings in Odoo.

  • 3. Find the Barcode Database section and enter the API Key.

  • 4. Save the configuration so the value is stored in ir.config_parameter.

  • 5. Check user permissions, because full use normally requires Settings or System-level access.


Auto-fill behavior when entering a barcode

When an authorized user enters a sufficiently long valid barcode and leaves the field, Odoo calls the barcode lookup service and updates fields that are empty or still need enrichment.

Steps

  • 1. Go to Inventory → Products → Products and create or open a product.

  • 2. Enter a valid barcode such as UPC-A or EAN-13.

  • 3. Leave the Barcode field to trigger onchange logic.

  • 4. Review the auto-filled values and adjust anything that should follow internal naming or category standards.

  • 5. Save the product after confirming the imported data is good enough for operational use.

Common auto-filled fields

FieldSourceNotes
NametitleUsually filled when the product name is still empty or needs an initial label
Imageimages[]Takes the first valid image returned by the API
WeightweightSupports lb-to-kg conversion or the reverse depending on system settings
List Pricestores[].priceMay be converted into the company currency
Attributesbrand, color, size, material, ...Created only when the product and user permissions allow it
Category / Descriptioncategory, description, featuresUsed to enrich newly created product records

Bulk image fetching with the wizard

Key points

  • • The wizard prioritizes products that have a barcode and still do not have an image.

  • • The UI warns about image copyright, so downloaded images should be reviewed before publication.

Steps

  • 1. Open the Products or Product Variants list.

  • 2. Select multiple items and use Action → Get Pictures from Barcode Lookup.

  • 3. The wizard shows the total selected, the number eligible for processing, and the number that cannot be processed.

  • 4. Click Get Pictures to process an initial subset immediately.

  • 5. The remaining products are flagged as pending and handed off to CRON.


Background processing and CRON

CRON trigger scenarios

ScenarioTrigger timingMeaning
Products still pendingImmediate or after 1 minuteContinue the next batch
API rate limit 429After 1 dayWait for the next daily quota window
Repeated timeout or connection errorsAfter 1 hourGive the external service time to recover
Normal background processingASAPReturn images quickly when the system is ready

Error codes and reactions

CodeSystem reactionWhat to check
403Stop and report invalid API keyReview the API key in Settings
429Defer CRON to the next dayWatch daily API usage
404Skip and continueA specific barcode may have no result
Timeout / Connection ErrorRetry, then defer if neededCheck network and external service health

Automatic attributes and conversions

Key points

  • • The module can work with common attributes such as color, gender, material, brand, size, and age group.

  • • If a matching attribute does not already exist in master data, Odoo can enrich the product with corresponding information or place extra data in the description.

  • • Weight, dimensions, and volume can be converted based on the measurement system used in the database.

  • • Reference store pricing from the API should be treated as starter data, not the final commercial price policy.


Operational notes

Key points

  • • Use barcode lookup as a fast-start enrichment tool, then let the product team review naming, categories, and descriptions against internal standards.

  • • Track API quotas so the wizard does not stall unexpectedly after the daily request limit is reached.

  • • Not every downloaded image is safe for commercial reuse, so review legal or branding requirements before publishing.

  • • If the system says a background task is already running, wait for that CRON job instead of repeatedly starting more jobs.