Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odgovori
7501 Prikazi

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
Opusti

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
Opusti
Related Posts Odgovori Prikazi Aktivnost
2
maj 24
6530
1
jan. 20
6198
1
jan. 16
3645
0
sep. 15
4100
0
avg. 15
4610