Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
1358 Lượt xem

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.



Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 3 25
666
0
thg 11 23
2176
1
thg 5 25
515
0
thg 9 24
952
2
thg 7 24
1314