Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
7747 มุมมอง

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
6784
odoo module update error แก้ไขแล้ว
1
ม.ค. 20
6404
1
ม.ค. 16
3840
0
ก.ย. 15
4345
0
ส.ค. 15
4893