Odoo 19.0 Community · Persistent

loyalty.program: fields, relations and API

The loyalty.program model ("Loyalty Program") is a persistent model declared by the Coupons & Loyalty module, then extended by 4 other modules. It exposes 44 fields, 37 of them declared directly on the model; 6 fields from other models point to it. Below you will find every field with its technical name, type, label and relations, followed by an Odoo 19 JSON-2 API call.

Model identity

Technical name
loyalty.program
Label
Loyalty Program
Type
Persistent (models.Model)
SQL table
loyalty_program
Origin module
Coupons & Loyalty (loyalty)
Extended by
pos_loyalty, sale_loyalty, sale_loyalty_delivery, website_sale_loyalty
Default order (_order)
sequence
Display field (_rec_name)
name
Inherits from (mixins)
pos.load.mixinwebsite.multi.mixin

Model fields

37 own fields, 1 inherited from mixins and 6 automatic ORM fields. Click a name to get a direct link to that field.

44 of 44 fields shown

Technical nameLabelTypeDetails
activeActiveboolean
applies_onApplies Onselection
requiredcomputed, stored

Values: current (Current order), future (Future orders), both (Current & Future orders)

available_onAvailable On

Manage where your program should be available for use.

boolean
communication_plan_idsCommunication Planone2many
computed, stored

inverse: program_id

company_idCompanymany2one
coupon_countCoupon Countinteger
computed
coupon_count_displayItemschar
computed
coupon_idsCouponone2many

inverse: program_id

currency_idCurrencymany2one
requiredcomputed, stored
currency_symbolCurrency Symbolchar

related: currency_id.symbol

date_fromStart Date

The start date is included in the validity period of this program

date
date_toEnd date

The end date is included in the validity period of this program

date
ecommerce_okAvailable on Websiteboolean

added by Coupons, Promotions, Gift Card and Loyalty for eCommerce (website_sale_loyalty)

is_nominativeIs Nominativeboolean
computed
is_payment_programIs Payment Programboolean
computed
limit_usageLimit Usageboolean
mail_template_idEmail templatemany2one
computed
max_usageMax Usageinteger
nameProgram Namechar
requiredtranslatable
order_countOrder Countinteger
computed

added by Sale Loyalty (sale_loyalty)

payment_program_discount_product_idDiscount Product

Product used in the sales order to apply the discount.

many2one
read-onlycomputed
portal_point_namePortal Point Namechar
computed, storedtranslatable
portal_visiblePortal Visible

Show in web portal, PoS customer ticket, eCommerce checkout, the number of points available and used by reward.

boolean
pos_config_idsPoint of Sales

Restrict publishing to those shops. Note: A program will only be used in the shops using the same currency as the program.

many2many
computed, stored

added by Point of Sale - Coupons & Loyalty (pos_loyalty)

pos_okPoint of Saleboolean

added by Point of Sale - Coupons & Loyalty (pos_loyalty)

pos_order_countPoS Order Countinteger
computed

added by Point of Sale - Coupons & Loyalty (pos_loyalty)

pos_report_print_idPrint Report

This is used to print the generated gift cards from PoS.

many2one
computed

added by Point of Sale - Coupons & Loyalty (pos_loyalty)

pricelist_idsPricelist

This program is specific to this pricelist set.

many2many
program_typeProgram Typeselection
required

Values: coupons (Coupons), gift_card (Gift Card), loyalty (Loyalty Cards), promotion (Promotions), ewallet (eWallet), promo_code (Discount Code), buy_x_get_y (Buy X Get Y), next_order_coupons (Next Order Coupons)

reward_idsRewardsone2many
computed, stored

inverse: program_id

rule_idsConditional rulesone2many
computed, stored

inverse: program_id

sale_okSalesboolean

added by Sale Loyalty (sale_loyalty)

sequenceSequenceinteger
show_non_published_product_warningShow Non Published Product Warningboolean
computed

added by Coupons, Promotions, Gift Card and Loyalty for eCommerce (website_sale_loyalty)

total_order_countTotal Order Countinteger
computed
triggerTrigger

Automatic: Customers will be eligible for a reward automatically in their cart. Use a code: Customers will be eligible for a reward if they enter a code.

selection
computed, stored

Values: auto (Automatic), with_code (Use a code)

trigger_product_idsTrigger Productmany2many

related: rule_ids.product_ids

website_idWebsite

Restrict to a specific website.

many2one

inherited from website.multi.mixin

create_dateCreated ondatetime
read-onlyautomatic
create_uidCreated bymany2one
read-onlyautomatic
display_nameDisplay Namechar
read-onlycomputedautomatic
idIDinteger
read-onlyautomatic
write_dateLast Updated ondatetime
read-onlyautomatic
write_uidLast Updated bymany2one
read-onlyautomatic

Relations

Models linked from this model

Fields of other models pointing here

Reading this model through the API

Odoo 19 JSON-2 API call reading the first five records with real fields of the model. Replace the instance, database and API key with your own.

curl
curl -X POST "https://your-instance.odoo.com/json/2/loyalty.program/search_read" \
  -H "Authorization: bearer $ODOO_API_KEY" \
  -H "X-Odoo-Database: your-db" \
  -H "Content-Type: application/json" \
  -d '{"domain":[],"fields":["name","applies_on","currency_id","program_type","company_id"],"limit":5}'
Python (requests)
import requests

BASE_URL = "https://your-instance.odoo.com/json/2"
headers = {"Authorization": f"bearer {API_KEY}", "X-Odoo-Database": "your-db"}

res = requests.post(
    f"{BASE_URL}/loyalty.program/search_read",
    headers=headers,
    json={"domain": [], "fields": ["name","applies_on","currency_id","program_type","company_id"], "limit": 5},
)
res.raise_for_status()
print(res.json())
  • External API access requires Odoo's Custom plan.
  • XML-RPC and JSON-RPC will be removed in Odoo 22 (fall 2028): use JSON-2.
  • The access rights and record rules of the key's user apply.

Cite this tool

Writing a tutorial, internal documentation or a forum answer? Copy this link to send your readers to the up-to-date reference.

<a href="https://aidoo.ai/en/outils/explorateur-modeles-odoo/loyalty-program">loyalty.program (Odoo 19.0)</a>

Sources

Data verified on September 23, 2026 · Odoo 19.0 Community

Have an Odoo project, or want to put your ERP to work with AI? Let's talk

Implementation, custom module development, connecting Claude or ChatGPT to your data: tell us about your context and we will reply within 24 business hours.