Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
2 Replies
7120 Tampilan

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
Buang

if it is not working then try this,

employee.identification_id = 3435323423

Jawaban Terbai

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
Buang
Post Terkait Replies Tampilan Aktivitas
2
Mei 24
6127
1
Jan 20
5826
1
Jan 16
3356
0
Sep 15
3757
0
Agu 15
4281