| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Point of Sale (point_of_sale)
• Discuss (mail) • Inventory (stock) • Invoicing (account) |
| Lines of code | 234 |
| Technical Name |
crowe_pos_expiry |
| License | LGPL-3 |
| Website | https://www.crowe.mv |
POS Expiry
Automatic expiry discounts, FEFO lot selection, and expiry on the receipt
Sell perishable stock with confidence. When a cashier selects a lot for a tracked product, POS Expiry applies a tiered discount based on days remaining until expiry, prints the expiration date on the customer receipt when within 30 days, and automatically picks the soonest-expiring lot when several batches are on the shelf.
Key Features
Expiry Discount Rules
Configure tiered markdowns by days remaining (e.g. 20% within 7 days, 10% within 14 days, 5% within 30 days). The tightest matching rule is applied automatically when a lot is selected at the POS.
Receipt Expiry Line
When the selected lot expires within 30 days, the expiration date is printed on the POS receipt under the order line so customers can see freshness at a glance.
FEFO Lot Selection
If multiple lots are in stock, the POS automatically selects the batch expiring soonest (first-expired, first-out) instead of prompting the cashier on every sale.
How It Works
Setup in the back office, then lot selection, discount, and receipt at the till
1. Configure discount tiers
Go to Point of Sale → Configuration → Expiry Discount Rules and set your markdown tiers. Defaults are created on install (20% / 7 days, 10% / 14 days, 5% / 30 days). Edit or add rows at any time — no code changes required.
2. Prepare lot-tracked products
On the product form, set the product type to Goods and enable Track Inventory → By Lots. Make the product available in Point of Sale, then receive stock into lots — each batch can expire on a different day.
3. Enable expiration dates
On the Inventory tab, check Expiration Date under Traceability. Expiration is stored on each lot/serial number when stock is received.
product_expiry app. Discounts
and receipt expiry apply once a lot with an expiration date is selected at the POS.
4. Select a lot at the POS
When a lot-tracked product is added, the soonest-expiring batch is chosen automatically (FEFO). Cashiers can open the lot picker to choose a different batch — each option shows its expiration date (e.g. LT/026/1506 — Exp: 2026-07-12).
5. Discounts apply on the order
The matching tier is applied to the order line as soon as the lot is set. In this example, three lines of Fresh Yogurt 500ml carry 20%, 10%, and 5% off based on each lot’s days remaining.
6. Expiry prints on the receipt
After payment, the receipt shows the lot number and an Exp: line under each product whose lot expires within 30 days — alongside the discount that was applied at the till.
Configuration
Discount rules in one menu — products use standard lot tracking
-
Install POS Expiry (requires
point_of_saleandproduct_expiry). - Open Point of Sale → Configuration → Expiry Discount Rules and adjust the default tiers or add your own.
- On each perishable product: enable By Lots tracking and Expiration Date on the Inventory tab.
- Create lots with expiration dates and receive stock into the POS warehouse location.
- Open a POS session, sell a tracked product, and confirm the discount and receipt output.
Benefits
Reduce waste
Move stock before it expires with consistent, rule-based markdowns at the till instead of ad-hoc cashier discounts.
FEFO without friction
The soonest-expiring lot is selected automatically when multiple batches are in stock, keeping rotation disciplined without extra cashier steps.
Transparent receipts
Customers see the expiration date on the receipt when a product is within 30 days of expiry — clear freshness information at checkout.
Configurable tiers
Discount rules are editable lists in the back office. Change percentages and day thresholds without touching code or redeploying custom POS logic.
Feature Summary
At the POS
Automatic discount when a lot is selected or changed.
FEFO auto-selection when multiple lots are in stock.
Expiration dates shown in the lot/serial picker.
Expiry line on the customer receipt (within 30 days).
In the back office
Editable expiry discount rule list under Point of Sale configuration.
Default tiers loaded on install (7 / 14 / 30 days).
Works with standard Odoo lot tracking and product expiry.
No separate POS product setup beyond lot-tracked inventory.
Technical Details
Server side
-
expiry.discount.rule — stores discount tiers by days remaining;
get_discount_for_days()resolves the matching percentage for a lot. -
stock.lot —
get_pos_lot_info()returns expiration date, receipt visibility, and discount for a product/lot pair at the POS. -
pos.order.line — extends
get_existing_lots()with expiration dates and addslot_expiration_datefor receipt sync.
Front end (OWL)
- Patches PosStore for FEFO auto-selection and discount on add-to-cart.
- Patches OrderSummary to re-apply rules when lots are edited on a line.
- Patches SelectLotPopup to show expiration dates in lot labels.
- Extends the OrderReceipt template with an expiry line per order line.
Compatibility & Dependencies
Version
Built for Odoo 19.0, compatible with both Community and Enterprise editions.
Dependencies
Requires point_of_sale and product_expiry.
Support
Brought to you by Crowe Maldives LLP
Author
Crowe Maldives LLP
Website
www.crowe.mv
Licensed under LGPL-3. Maintained by Exponent Pvt Ltd.
Please log in to comment on this module