Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
7462 Visualizzazioni

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
Abbandona

if it is not working then try this,

employee.identification_id = 3435323423

Risposta migliore

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
2
mag 24
6503
1
gen 20
6173
1
gen 16
3613
0
set 15
4081
0
ago 15
4586