POS Customer Age Warning

pos_customer_age_warning
REPOSITORY
REPOSITORYOCA/pos
GIT
GIThttps://github.com/OCA/pos.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/pos/tree/17.0/pos_customer_age_warning
VERSION
VERSION 0.1.0
CATEGORY
CATEGORYPoint of sale
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Invitu
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Invitu
COMMITTERS
COMMITTERSWeblate, OCA-git-bot, oca-ci, Parvez Qureshi
WEBSITE
WEBSITEhttps://github.com/OCA/pos
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:20:02
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/partner-contact:
    - partner_contact_birthdate
    - partner_contact_personal_information_page
OCA/pos:
    - pos_partner_birthdate
odoo/odoo:
    - point_of_sale
    - stock_account
    - stock
    - product
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - uom
    - barcodes_gs1_nomenclature
    - barcodes
    - digest
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - resource
    - account
    - onboarding
    - analytic
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module enhances Odoo's Point of Sale (POS) by introducing an age verification system.
When a customer is selected, their age (based on their date of birth) is checked against the
predefined **"Age Warning"** threshold set in the POS configuration.

If the customer's age is **less than or equal** to this threshold, their name
will be displayed in **red** on the POS interface to alert the cashier.

## Use Cases
### **Case 1: Alcohol Sales**
- **"Age Warning" threshold set to 18 years**.
- A customer born on **June 5, 2010**, is selected in **March 2025**.
- **Age**: 2025 - 2010 = **14 years old**.
- **Result**: Their name appears in **red**, warning the cashier.

### **Case 2: Customer is of Legal Age**
- **"Age Warning" threshold set to 18 years**.
- A customer born on **February 2, 2003**, is selected in **March 2025**.
- **Age**: 2025 - 2003 = **22 years old**.
- **Result**: No warning, as the customer is above the age limit.

### **Case 3: Gaming Center (No entry for under 16s)**
- **"Age Warning" threshold set to 16 years**.
- A customer born on **July 15, 2009**, is selected in **March 2025**.
- **Age**: 2025 - 2009 = **15 years old** (birthday in July).
- **Result**: Their name appears in **red** because they are not yet 16.

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
view_res_config_settings_birthdate_warning res.config.settings xpath Inherits point_of_sale.res_config_settings_view_form
Models touched (3)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (1)
  • age_warning Integer
Public methods (0)

No public methods.

New fields (1)
  • age_warning Integer
    help='Choose the age max for the warning' readonly=False related='company_id.age_warning'
Public methods (0)

No public methods.