Link loyalty programs to order lines
This module adds a link in the sale order line to the program used in a discount, so it can be easily tracked afterwards. Also eases the implementation of loyalty modules that don't necessarily use the discount product as product for the discount line.
It also links the reward lines to:
- The order lines that generated them, so we can follow which order lines produced which discounts.
- The order lines over which the reward is applied:
- In a discount promo: the cheapest product, specific products or the whole order.
- In a product promo: the product lines over which the reward is discounted.
Additionally, this module adds a button in the loyalty program form view to open related sale orders.
auto_awesome What this module does
AI-generated from the code · Odoo 18.0Links each sale order line to the loyalty program and reward lines it is involved with, so you can trace which promotions generated or applied discounts. Adds a button on the loyalty program form to see related sale orders.
This module makes promotions traceable on sale orders. On every sale order line you can now see the loyalty program it belongs to, the reward lines applied to it, the reward lines it generated, and the original lines that generated a reward. These fields appear in the order line list and form (hidden by default, you can enable them from the column selector) and are read-only.
On the loyalty program form, a new "Related SO" button shows how many sale orders use that program and opens the list of those orders.
In the Sales analysis report, a Loyalty Program column and filter are added, plus a "Promotion Lines" filter and a "Loyalty Program" grouping option, so you can analyse sales by promotion.
Behind the scenes, when a reward line is written, the system automatically links it to the order lines it applies to (whole order, cheapest product, or specific products) and to the lines that generated it, matching by tax and by the program's product rules. This helps you understand which products produced which discounts.
Depends on
Required by other modules
Models and fields (4)
- sale.order · extends an existing model
- sale.report · extends an existing modelloyalty_program_id (Loyalty Program)
- loyalty.program · extends an existing modelrelated_so_count
- sale.order.line · extends an existing modelreward_line_ids (Reward lines), loyalty_program_id (Loyalty Program), reward_generated_line_ids (Reward Generated lines), reward_origin_generated_line_ids (Origin Reward Generated lines)
Text generated by AI (DeepSeek) from reading the Odoo 18.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub
Availability by version
Reviewed: 2026-11-03Confirmation status: 3 confirmed, 6 with no information of 9 versions.
Sources · Odoo 17.0
Confirmed on 2026-11-03 in branch 17.0 of OCA/sale-promotion.
terminal Installation and usage
No verified informationInstallation instructions, the distribution package, dependencies and configuration steps are not shown because they have not yet been verified in the module documentation for any version.
Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.