Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
2 Respostas
16572 Visualizações

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
Cancelar

self._origin.id will solve your problem.

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

Autor Melhor resposta

This can be found at self._origin.id

Avatar
Cancelar
Melhor resposta

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
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
0
jul. 19
5437
2
mai. 15
21414
3
abr. 23
13326
0
abr. 22
3201
2
jul. 24
2967