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

Hello,

How can I update a recordset?. The below code does not work.

employee = self.env['hr.employee'].search([('id', '=', holiday.employee_id.id)], limit=1)

employee.write({'identification_id': '3435323423'})


الصورة الرمزية
إهمال

if it is not working then try this,

employee.identification_id = 3435323423

أفضل إجابة

Hi

Your format is correct If your identification_id field is a string

If it is a many2one or integer field then you should remove the quotes.

ie, employee.write({'identification_id': 3435323423})
You can also write like Niyas Raphy said.

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
2
مايو 24
6510
1
يناير 20
6186
1
يناير 16
3619
0
سبتمبر 15
4084
0
أغسطس 15
4594