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

Hello, good day everyone!


I just want to ask why I cannot post a message/log on a form of my own model in odoo 10. It displays a "KeyError: ['id_of_the_record']". What should I do to overcome this error. 

This is my code:

@api.constrains('is_state_sync')
def _constrains_is_state_sync(self):
for rec in self:
if not rec.is_state_sync:
print "test function........"
else:
​rec.message_post(body='Test Message.............')

Thank you very much in advance for your help.


Sincerely your,

Jhonnel

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
2
يوليو 25
599
0
ديسمبر 24
1185
2
أكتوبر 24
1326
1
أغسطس 24
2462
2
يوليو 24
1686