Skip to Content
Menú
This question has been flagged
2 Respostes
7124 Vistes

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
Descartar

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.

Avatar
Descartar
Related Posts Respostes Vistes Activitat
2
de maig 24
6127
1
de gen. 20
5832
1
de gen. 16
3363
0
de set. 15
3761
0
d’ag. 15
4290