gamification.goal.definition: fields, relations and API
The gamification.goal.definition model ("Gamification Goal Definition") is a persistent model declared by the Gamification module. It exposes 25 fields, 19 of them declared directly on the model; 3 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
gamification.goal.definition- Label
- Gamification Goal Definition
- Type
- Persistent (models.Model)
- SQL table
gamification_goal_definition- Origin module
- Gamification (
gamification)
Model fields
19 own fields, 0 inherited from mixins and 6 automatic ORM fields. Click a name to get a direct link to that field.
25 of 25 fields shown
| Technical name | Label | Type | Details |
|---|---|---|---|
| action_id | Action The action that will be called to update the goal value. | many2one | |
| batch_distinctive_field | Distinctive field for batch user In batch mode, this indicates which field distinguishes one user from the other, e.g. user_id, partner_id... | many2one | |
| batch_mode | Batch Mode Evaluate the expression in batch instead of once for each user | boolean | |
| batch_user_expression | Evaluated expression for batch mode The value to compare with the distinctive field. The expression can contain reference to 'user' which is a browse record of the current user, e.g. user.id, user.partner_id.id... | char | |
| computation_mode | Computation Mode Define how the goals will be computed. The result of the operation will be stored in the field 'Current'. | selection | required Values: |
| compute_code | Python Code Python code to be executed for each user. 'result' should contains the new current value. Evaluated user can be access through object.user_id. | text | |
| condition | Goal Performance A goal is considered as completed when the current value is compared to the value to reach | selection | required Values: |
| description | Goal Description | text | |
| display_mode | Displayed as | selection | required Values: |
| domain | Filter Domain Domain for filtering records. General rule, not user depending, e.g. [('state', '=', 'done')]. The expression can contain reference to 'user' which is a browse record of the current user if not in batch mode. | char | required |
| field_date_id | Date Field The date to use for the time period evaluated | many2one | |
| field_id | Field to Sum | many2one | |
| full_suffix | Full Suffix The currency and suffix field | char | computed |
| model_id | Model | many2one→ ir.model | |
| model_inherited_ids | Model Inherited | many2many→ ir.model | related: |
| monetary | Monetary Value The target and current value are defined in the company currency. | boolean | |
| name | Goal Definition | char | requiredtranslatable |
| res_id_field | ID Field of user The field name on the user profile (res.users) containing the value for res_id for action. | char | |
| suffix | Suffix The unit of the target and current values | char | translatable |
| 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.act_window: action_id
- ir.model: model_id, model_inherited_ids
- ir.model.fields: batch_distinctive_field, field_date_id, field_id
Fields of other models pointing here
- gamification.badge: goal_definition_ids
- gamification.challenge.line: definition_id
- gamification.goal: definition_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/gamification.goal.definition/search_read" \
-H "Authorization: bearer $ODOO_API_KEY" \
-H "X-Odoo-Database: your-db" \
-H "Content-Type: application/json" \
-d '{"domain":[],"fields":["name","computation_mode","condition","display_mode","domain"],"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}/gamification.goal.definition/search_read",
headers=headers,
json={"domain": [], "fields": ["name","computation_mode","condition","display_mode","domain"], "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/gamification-goal-definition">gamification.goal.definition (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.