| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Invoicing (account)
• Sales (sale_management) • Discuss (mail) |
| Lines of code | 803 |
| Technical Name |
gb_gift_card_store_credit |
| License | OPL-1 |
| Website | https://pokutsoft.com/ |
| Versions | 18.0 19.0 |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Invoicing (account)
• Sales (sale_management) • Discuss (mail) |
| Lines of code | 803 |
| Technical Name |
gb_gift_card_store_credit |
| License | OPL-1 |
| Website | https://pokutsoft.com/ |
| Versions | 18.0 19.0 |
Gift Card & Store Credit
Community gift-card engine with store-credit balance ledger
Odoo's built-in gift-card handling leans on Enterprise and offers no real balance ledger, leaving Community retailers reconciling gift-card and returns liability in spreadsheets. This module is a self-contained gift-card and store-credit engine: issue cards with secure unique codes, initial value and expiry, redeem them partially or fully against sales orders, and run per-customer store-credit wallets for returns. Every issue, top-up, redemption, refund, transfer and write-off is an immutable gb.gift.card.transaction, so each balance is computed from the ledger and always auditable. A wizard handles top-ups, transfers and voids, and a scheduled job writes off expired cards automatically. Multi-currency and per-company aware, it runs entirely on Odoo Community with no external service.
Key Features
Secure unique-code gift cards
Each gb.gift.card gets a collision-checked GC- code generated with Python's secrets module, plus an initial value, issue and expiry dates and an optional recipient partner. A per-company unique constraint blocks duplicate codes, and lookup_by_code resolves a card for POS or website use.
Immutable transaction ledger
Every movement is a gb.gift.card.transaction of type issue, topup, redeem, refund, writeoff or transfer. Posted rows are protected: write() blocks edits to amount or type and unlink() blocks deletion unless the parent is cascading, so balances are always defensible and auditable.
Live computed balances
_compute_balance sums posted credit types minus debit types and rounds to the card currency, storing both balance and redeemed_amount. The figure on the card is always the ledger truth rather than a manually maintained number.
Partial and full redemption with guards
action_redeem rounds the amount, rejects redemptions on non-active cards or amounts above the balance, posts a redeem transaction (optionally linked to a sale.order) and calls _refresh_state to flip the card to 'empty' when depleted. The redeem wizard accepts a typed code or card.
Per-customer store-credit wallets
gb.store.credit gives each partner one wallet per company (enforced by constraint), sharing the same transaction ledger via signed_amount. add_credit and spend post movements, get_or_create returns the wallet, and a non-zero balance blocks deletion.
Top-up, transfer and void wizard
The gb.gift.card.adjust.wizard tops up an active card, voids it (writing off any remaining balance), or transfers value between cards by posting paired transfer_out and transfer_in ledger entries. Managers adjust cards without ever editing balances directly.
Automatic expiry write-off cron
The _cron_expire_cards scheduled job finds active cards past their expiry_date, posts a writeoff for any remaining balance and sets the card to 'expired'. Stale liability is cleared off the books automatically instead of lingering indefinitely.
Sales and chatter integration
Cards and wallets inherit mail.thread so value, recipient and state changes are tracked in the chatter, and redemptions can reference the originating sale.order. The source_order_id records which order a card was sold on for full traceability.
Use Cases
Screenshots
Gift Cards
Adjust Gift Card
Redeem Gift Card
Transactions
Store Credit
Why Choose This Module
Issue gift cards, redeem them partially or fully, and run per-customer store-credit wallets — all backed by an immutable ledger so every balance is always auditable. Multi-currency and per-company aware, built entirely on Odoo Community.
Specifications
- Compatible: Odoo 18.0 / 19.0
- License: LGPL-3
- Languages: 35+
- Author: Pokutsoft
- Dependencies: account, sale_management
- Support: support@pokutsoft.com
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module