Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
2 Besvarelser
7561 Visninger

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
Kassér

if it is not working then try this,

employee.identification_id = 3435323423

Bedste svar

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
Kassér
Related Posts Besvarelser Visninger Aktivitet
2
maj 24
6572
1
jan. 20
6250
1
jan. 16
3716
0
sep. 15
4142
0
aug. 15
4662