| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Inventory (stock)
• Website (website) • Discuss (mail) |
| Lines of code | 344 |
| Technical Name |
product_public_qr |
| License | LGPL-3 |
Product Public QR
Smart Barcode & QR Code System for Odoo 19
Auto-generate unique barcodes, QR codes, and public URLs for every product â directly inside Odoo Inventory. No manual work. No login required to scan.
Key Features
Auto Barcode on Create
Every new product instantly receives a random 8-character barcode (e.g. MR156324) â 2 uppercase letters + 6 digits. No sequences, no manual input needed.
Cryptographic Security Token
Each product gets a secrets.token_urlsafe(24) token ensuring public URLs are unguessable and unique. SQL constraints enforce uniqueness at the database level.
QR Code Auto-Generated
Binary PNG QR code computed directly from the public URL via qrcode[pil] library. No external API calls. Always in sync with the product URL.
Public Product Page
Scan any QR code to open a live product info page showing stock locations and quantities. No Odoo login required â accessible by anyone with the link.
Bulk QR Label Printing
Print paginated PDF sheets with 10 QR labels per A4 page directly from the product list or form view. Supports multi-record selection.
Smart Generate Button
A "Generate Barcode" button appears in the form header only when no barcode exists. One click regenerates barcode, token, URL, and QR code together.
Live Stock Locations
Public page shows all internal warehouse locations and quantities for the scanned product, always live-synced with Odoo Inventory â including locations with zero quantity.
SQL Unique Constraints
Database-level uniqueness enforced on both barcode and token fields. Collision-proof even in high-volume environments.
Computed Public URL
Public URL is automatically computed from the base URL and token. Format: /product-info/<id>/<token>. Always up to date when token changes.
How It Works
Create a product
The moment a product is saved, the module intercepts create() and generates barcode, token, public URL, and QR code in a single write automatically.
automaticOr click "Generate Barcode"
For existing products without a barcode, a smart button appears in the form header. One click triggers regeneration of all four fields simultaneously.
manual triggerPrint QR labels
Select one or many products, choose Print â Product QR Label, and get a clean paginated PDF â 10 QR labels per A4 page with product name.
on demandScan from anywhere
Anyone with a phone camera can scan the QR code to reach the public product page. Token-secured, no login required, live data pulled from Odoo Inventory in real time.
public accessInstallation
1. Copy module to your custom addons directory
2. Install the required Python library
3. Restart Odoo and upgrade the module
Screenshots
About the Author
Mahmoud Gomaa
Odoo Developer · Saudi Arabia
Please log in to comment on this module