İçereği Atla
Menü
Bu soru işaretlendi
2 Cevaplar
7436 Görünümler

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'})


Avatar
Vazgeç

if it is not working then try this,

employee.identification_id = 3435323423

En İyi Yanıt

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.

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
2
May 24
6443
1
Oca 20
6136
1
Oca 16
3595
0
Eyl 15
4062
0
Ağu 15
4557