Odoo 19.0 Community · Persistent

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 nameLabelTypeDetails
action_idAction

The action that will be called to update the goal value.

many2one
batch_distinctive_fieldDistinctive 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_modeBatch Mode

Evaluate the expression in batch instead of once for each user

boolean
batch_user_expressionEvaluated 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_modeComputation Mode

Define how the goals will be computed. The result of the operation will be stored in the field 'Current'.

selection
required

Values: manually (Recorded manually), count (Automatic: number of records), sum (Automatic: sum on a field), python (Automatic: execute a specific Python code)

compute_codePython 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
conditionGoal Performance

A goal is considered as completed when the current value is compared to the value to reach

selection
required

Values: higher (The higher the better), lower (The lower the better)

descriptionGoal Descriptiontext
display_modeDisplayed asselection
required

Values: progress (Progressive (using numerical values)), boolean (Exclusive (done or not-done))

domainFilter 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_idDate Field

The date to use for the time period evaluated

many2one
field_idField to Summany2one
full_suffixFull Suffix

The currency and suffix field

char
computed
model_idModelmany2one
model_inherited_idsModel Inheritedmany2many

related: model_id.inherited_model_ids

monetaryMonetary Value

The target and current value are defined in the company currency.

boolean
nameGoal Definitionchar
requiredtranslatable
res_id_fieldID Field of user

The field name on the user profile (res.users) containing the value for res_id for action.

char
suffixSuffix

The unit of the target and current values

char
translatable
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/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}'
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}/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.