Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
16570 Visualizzazioni

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
Abbandona

self._origin.id will solve your problem.

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

Autore Risposta migliore

This can be found at self._origin.id

Avatar
Abbandona
Risposta migliore

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
0
lug 19
5434
2
mag 15
21413
3
apr 23
13323
0
apr 22
3199
2
lug 24
2963