OdooWiki OCA HUB

Sale Loyalty Suggestions

sale_loyalty_order_suggestion folder_open OCA/sale-promotion open_in_new
Sale License: AGPL-3

This module extends the functionality of the sale_loyalty wizard by giving hints of available promotions and products needed to apply them to the seller placing the sales order. A product added to the lines of a sales order will be marked with a gift icon if there is a promotion containing that product as part of its rules.

auto_awesome What this module does

AI-generated from the code · Odoo 18.0

Shows a gift icon on sales order lines when the product can trigger an available promotion, and opens the promotion wizard to add the missing quantities needed to claim the reward.

When you add a product to a sales order line, Odoo checks the active automatic loyalty programs that apply to the current order and whose rules include that product with a minimum quantity. If a matching promotion exists, a small gift icon appears on the line (in both list and kanban views of the order lines).

Clicking the gift icon saves the order and opens the standard loyalty reward wizard, pre-filtered to the promotions suggested for that product. If the order does not yet contain enough units to claim the selected reward, the wizard shows a table of the products required by the promotion rule, with the quantity already included, the quantity required and an editable "Units to include" column. A message above the table states the required quantity and the products concerned.

When you confirm the wizard, the quantities you entered are added to the existing order lines or create new lines, then the order's programs and rewards are recalculated before the reward is applied. The suggestion is not shown for lines that are already reward lines or for orders in the done state.

The module extends sale.order, sale.order.line and the sale.loyalty.reward.wizard, and adds a new transient model for the rule product lines shown in the wizard.

Depends on

sale_loyalty
Models and fields (4)
  • sale.order · extends an existing model
  • sale.order.line · extends an existing modelsuggested_promotions, suggested_reward_ids, suggested_promotion_ids
  • sale.loyalty.reward.wizard · extends an existing modelproduct_id, applicable_program, loyalty_rule_line_ids (Loyalty Rule Lines), loyalty_rule_line_description
  • sale.loyalty.rule.product_line.wizard · new modelorder_id, wizard_id, company_id, price_unit (Unit Price), product_id, currency_id, pricelist_id, units_included (Included units), units_required (Required units), units_to_include (Units to include)

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-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 2 confirmed, 7 with no information of 9 versions.

Sources · Odoo 16.0

Confirmed on 2026-11-03 in branch 16.0 of OCA/sale-promotion.

terminal Installation and usage

OCA documentation · Odoo 18.0

To use this module:

  • Configure or create a promotion and set in its rules products and a required quantity.
  • Create a sales order and add to the order lines one of the products that were part of the promotion rules. This line will then be marked with an icon (🎁) which will appear at the end on the right.
  • Click on the icon and the wizard will open with the available promotions of which the product is part of its rules.
  • Select the promotion and the products needed to apply it.

No verified information in OCA: Installation, Configuration.

info

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.