Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
1920 Visualizzazioni

We are using {base}/web/dataset/call_kw endpoint to fetch data from multiple models.


E.g. event.event model returns following


{
  "jsonrpc": "2.0",
  "id": null,
  "result": [
    {
      "id": 72,
      "language_ids": [],
      "event_type_id": [
        70,
        "Some display name"
      ]
}
]
}

We would like to fetch numerical id only without display name. Is that possible e.g. with some context key-value pair?

For event.event model problim is not huge but res.partner.relationship is bigger issue because references to res.partner will contain user names we would not like to store outside of the Odoo.



Avatar
Abbandona
Risposta migliore

The read​function has a load​ parameter set to _classic_read​ by default. To disable the use of name_get​, just set load=False​.

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
0
mar 25
962
0
nov 23
2499
1
mag 25
907
0
set 24
1287
2
lug 24
1661