Selling or given gift cards is a common practice for some businesses.
A gift card is managed mostly like a deposit but not linked to a party but to a gift card ID.
A gift card can be sold but also created by the user (for free).
The result of a sale complain could be a gift card.
On product, we add a checkbox to make it a gift card for types service or goods.
On processing the sale, for each line with a product gift card we create a gift card instance with a unique ID (if it is configured). The ID comes from a sequence configured on the product configuration per companies. The gift card instance stores also the amount in currency of the sale line (without taxes) and the sale line as origin. If the product is a goods, we link to the stock move the card instance. A number must be required on the instance to do the move.
To consume a gift card, we add a One2Many on the sale order (like the coupon) but only for the same currency and company. A gift card can be added only to one sale.
On quotation a return line for each card is added which reduce the amount to pay.
In some cases there will be actual cards whose stock will have to be managed. How do you intend to manage those cases if gift card can only be used for products of service type?
I do not think physical gift cards should be treated as goods (at best they are consumable). But any way, they must not be managed with stock moves because they are not stocked. Indeed in such case, it is about a task to sent the gift card like talked at New invoicing method when selling both goods and services.
I concur with the objection raised by @albert: you can buy gift cards and print them out if desired. And the raw gift cards are subject to the usual stock and supply management.
There are companies who buy the gift cards from a supplier like a print shop. Because the gift cards can have a nice design or special features to prevent fraud. These gift cards are bought in batches and that means IMO that the company have to stock those gift cards before they are sold.
I think we should always use the full amount of the gift card. This will simplify a lot for concurrency as we could simply use a Many2One which will serve as lock. If the amount of the card is greater than the sale, it will generate a credit note. But the salesman could add another gift card for the remaining amount if he wants. I think also we could add an option to convert the extra amount into deposit if the module is activated.
As gift cards are accounted as a passive for the company once the gift cards are expired the company should account the non claimed gift cards as revenues.
The trends is to ban expiration date on gift cards. So for now I do not plan to implement it. But if someone needs it, it should not be difficult to add an end date and set a cron task that spend the value to the proper account.