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'})
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
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'})
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.
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
Daftar| Post Terkait | Replies | Tampilan | Aktivitas | |
|---|---|---|---|---|
|
|
2
Mei 24
|
7592 | ||
|
odoo module update error
Diselesaikan
|
1
Jan 20
|
7070 | ||
|
1
Jan 16
|
4526 | |||
|
0
Sep 15
|
5177 | |||
|
0
Agu 15
|
5647 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.
if it is not working then try this,
employee.identification_id = 3435323423