Skip to Content
Catalog / POS · Point of Sale / AC POS Barcode Fallback
AC POS Barcode Fallback
ac_pos_barcode_fallback

AC POS Barcode Fallback

Scan any barcode at the register and pull the product straight from the database

v19.0.1.0.0 AlshayebCo Point of Sale

Adds an @api model method `pos_load_by_barcode` on product template that builds a barcode domain over product_variant_ids.barcode and template barcode, then calls `load_product_from_pos` with context load_archived=True and active_test=False so archived variants load. A frontend OWL patch on ProductScreen overrides `_getProductByBarcode`: on a native miss it calls the server method via pos data.callRelated, retries the local model lookup (also trying a leading-zero-stripped code), and warns if still not found. Assets injected into point_of_sale._assets_pos. Depends on point_of_sale only.

Overview

By default the Point of Sale only knows about products that were loaded when the session opened, so scanning an archived item or one not flagged available-in-POS returns nothing and stalls the cashier. This module catches that miss, queries the database once for the scanned barcode, and merges the matching product into the live session so the scan succeeds. It also looks deeper than the native lookup, checking archived products and the variant barcode field directly, and gracefully handles leading-zero barcodes.

Key Features

  • Catches POS barcode scans that the native lookup fails to resolve and retries against the database.
  • Fetches the matching product on demand and merges it into the running POS session automatically.
  • Finds products that were never loaded into the session, including those not flagged available-in-POS.
  • Searches archived products and variants so retired items still ring up correctly.
  • Matches against the product variant barcode field directly, not just active variants.
  • Normalizes leading-zero barcodes by also trying the stripped numeric form.
  • Logs a clear warning when a barcode is genuinely absent from the database, separating missing items from load bugs.

Technical Details

Technical Name ac_pos_barcode_fallback
Version 19.0.1.0.0
License LGPL-3
Domain POS · Point of Sale

Security

No custom security groups or access rules are added. The fallback lookup is performed by the cashier's existing POS session using the standard point_of_sale access rights.

Dependencies

point_of_sale