Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
7103 Zobrazení

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
Zrušit

if it is not working then try this,

employee.identification_id = 3435323423

Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
2
kvě 24
6105
1
led 20
5803
1
led 16
3344
0
zář 15
3749
0
srp 15
4272