跳至内容
菜单
此问题已终结
2 回复
16549 查看

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

形象
丢弃

self._origin.id will solve your problem.

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

编写者 最佳答案

This can be found at self._origin.id

形象
丢弃
最佳答案

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

形象
丢弃
相关帖文 回复 查看 活动
0
7月 19
5399
2
5月 15
21387
3
4月 23
13281
0
4月 22
3159
2
7月 24
2923