تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
16568 أدوات العرض

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
يوليو 19
5433
2
مايو 15
21413
3
أبريل 23
13323
0
أبريل 22
3198
2
يوليو 24
2961