Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
2 Відповіді
7500 Переглядів

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


Аватар
Відмінити

if it is not working then try this,

employee.identification_id = 3435323423

Найкраща відповідь

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.

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
2
трав. 24
6525
1
січ. 20
6195
1
січ. 16
3637
0
вер. 15
4096
0
серп. 15
4605