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 name | Label | Type | Details |
|---|---|---|---|
| active | Active | boolean | |
| applies_on | Applies On | selection | requiredcomputed, stored Values: |
| available_on | Available On Manage where your program should be available for use. | boolean | |
| communication_plan_ids | Communication Plan | one2many | computed, stored inverse: |
| company_id | Company | many2one | |
| coupon_count | Coupon Count | integer | computed |
| coupon_count_display | Items | char | computed |
| coupon_ids | Coupon | one2many | inverse: |
| currency_id | Currency | many2one | requiredcomputed, stored |
| currency_symbol | Currency Symbol | char | related: |
| date_from | Start Date The start date is included in the validity period of this program | date | |
| date_to | End date The end date is included in the validity period of this program | date | |
| ecommerce_ok | Available on Website | boolean | added by Coupons, Promotions, Gift Card and Loyalty for eCommerce ( |
| is_nominative | Is Nominative | boolean | computed |
| is_payment_program | Is Payment Program | boolean | computed |
| limit_usage | Limit Usage | boolean | |
| mail_template_id | Email template | many2one | computed |
| max_usage | Max Usage | integer | |
| name | Program Name | char | requiredtranslatable |
| order_count | Order Count | integer | computed added by Sale Loyalty ( |
| payment_program_discount_product_id | Discount Product Product used in the sales order to apply the discount. | many2one | read-onlycomputed |
| portal_point_name | Portal Point Name | char | computed, storedtranslatable |
| portal_visible | Portal Visible Show in web portal, PoS customer ticket, eCommerce checkout, the number of points available and used by reward. | boolean | |
| pos_config_ids | Point 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_ok | Point of Sale | boolean | added by Point of Sale - Coupons & Loyalty ( |
| pos_order_count | PoS Order Count | integer | computed added by Point of Sale - Coupons & Loyalty ( |
| pos_report_print_id | Print Report This is used to print the generated gift cards from PoS. | many2one | computed added by Point of Sale - Coupons & Loyalty ( |
| pricelist_ids | Pricelist This program is specific to this pricelist set. | many2many | |
| program_type | Program Type | selection | required Values: |
| reward_ids | Rewards | one2many | computed, stored inverse: |
| rule_ids | Conditional rules | one2many | computed, stored inverse: |
| sale_ok | Sales | boolean | added by Sale Loyalty ( |
| sequence | Sequence | integer | |
| show_non_published_product_warning | Show Non Published Product Warning | boolean | computed added by Coupons, Promotions, Gift Card and Loyalty for eCommerce ( |
| total_order_count | Total Order Count | integer | computed |
| trigger | Trigger 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: |
| trigger_product_ids | Trigger Product | many2many | related: |
| website_id | Website Restrict to a specific website. | many2one→ website | inherited from website.multi.mixin |
| create_date | Created on | datetime | read-onlyautomatic |
| create_uid | Created by | many2one | read-onlyautomatic |
| display_name | Display Name | char | read-onlycomputedautomatic |
| id | ID | integer | read-onlyautomatic |
| write_date | Last Updated on | datetime | read-onlyautomatic |
| write_uid | Last Updated by | many2one | read-onlyautomatic |
Relations
Models linked from this model
- ir.actions.report: pos_report_print_id
- loyalty.card: coupon_ids
- loyalty.mail: communication_plan_ids
- loyalty.reward: reward_ids
- loyalty.rule: rule_ids
- mail.template: mail_template_id
- pos.config: pos_config_ids
- product.pricelist: pricelist_ids
- product.product: payment_program_discount_product_id, trigger_product_ids
- res.company: company_id
- res.currency: currency_id
Fields of other models pointing here
- coupon.share: program_id
- loyalty.card: program_id
- loyalty.generate.wizard: program_id
- loyalty.mail: program_id
- loyalty.reward: program_id
- loyalty.rule: program_id
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 -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}'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.