Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2 Răspunsuri
7461 Vizualizări

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


Imagine profil
Abandonează

if it is not working then try this,

employee.identification_id = 3435323423

Cel mai bun răspuns

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.

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
2
mai 24
6503
1
ian. 20
6173
1
ian. 16
3613
0
sept. 15
4081
0
aug. 15
4586