Skip to Content
Catalog / POS · Point of Sale / AC POS Product Stock Badge
AC POS Product Stock Badge
ac_pos_product_stock

AC POS Product Stock Badge

Live free-stock badge on every POS product card so cashiers stop overselling

v19.0.1.0.0 AlshayebCo Point of Sale

Inherits product template to add a non-stored computed free_qty field (summed from product_variant_ids.free_qty) and registers free_qty plus is_storable in _load_pos_data_fields so they ship with the POS payload. A get_pos_free_qty(ids) model method returns fresh per-template free quantities on demand. The OWL front-end (assets in point_of_sale._assets_pos) patches ProductScreen.prototype to poll and refresh on mount, on a 60s interval, and on category/search change, and patches OrderPaymentValidation to refresh sold items after validation; a t-inherit extension of point_of_sale.ProductCard renders the badge. Depends on point_of_sale and stock.

Overview

Cashiers in the Point of Sale interface normally cannot see how much stock is actually available, and the quantities loaded when a session opens quickly go stale as sales orders, purchases and other tills move the same inventory. This module paints a colour-coded availability badge directly on each product card and keeps it accurate by re-fetching the true free-to-use quantity from the database. The badge turns green when stock is on hand, red at zero, and shows an infinity symbol for non-storable products such as services, giving the till operator an at-a-glance signal before adding an item to the order.

Key Features

  • Displays a live free-to-use stock quantity badge on every product card in the POS product screen.
  • Colours the badge green when quantity is positive and red when it hits zero for instant visual warning.
  • Shows an infinity symbol on services and other non-storable products that never run out.
  • Re-reads the real free quantity from the database instead of trusting the snapshot loaded at session start.
  • Refreshes badges automatically every 60 seconds so figures stay current as other channels move stock.
  • Refreshes instantly when the cashier changes category or types a product search.
  • Re-checks availability for the items just sold right after an order is validated.
  • Exposes a summed free_qty on the product template by aggregating across its variants.
  • Fails silently on transient connection errors so the POS screen is never blocked.

Technical Details

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

Security

No new access rules or record rules are introduced. The module only adds a computed read-only field on the existing product template and reuses the standard Point of Sale and Inventory access already granted to till users.

Dependencies

point_of_sale stock