Skip to Content
Menu
This question has been flagged
2 Replies
7581 Rodiniai

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


Portretas
Atmesti

if it is not working then try this,

employee.identification_id = 3435323423

Best Answer

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.

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
2
geg. 24
6577
1
saus. 20
6268
1
saus. 16
3724
0
rugs. 15
4150
0
rugp. 15
4698