İçereği Atla
Menü
Bu soru işaretlendi
2 Cevaplar
16531 Görünümler

How could I get the current ID of a record in Onchange Function? self._id, self.id, will give you an object like <openerp.models.NewId object at 0xb0efbc4c> , My question is Whether the onchange function fetching values from ENV instead of an valid record?

I am following new api

Avatar
Vazgeç

self._origin.id will solve your problem.

Reference: https://www.youtube.com/watch?v=eYVD_m6-jz8&t=4s

Üretici En İyi Yanıt

This can be found at self._origin.id

Avatar
Vazgeç
En İyi Yanıt

Hi Hilar,

please follow this link.I think this will helps to solve.

https://www.odoo.com/forum/help-1/question/obtain-the-id-of-a-self-onchange-odoo-101202

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
0
Tem 19
5375
2
May 15
21351
3
Nis 23
13247
0
Nis 22
3146
2
Tem 24
2895