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'})
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.
Creează-ți un cont astăzi pentru a beneficia de funcții exclusive și a interacționa cu minunata noastră comunitate!
Înscrie-te| Postări similare | Răspunsuri | Vizualizări | Activitate | |
|---|---|---|---|---|
|
|
2
mai 24
|
9426 | ||
|
odoo module update error
Rezolvat
|
1
ian. 20
|
8743 | ||
|
1
ian. 16
|
5823 | |||
|
0
sept. 15
|
6677 | |||
|
0
aug. 15
|
7377 |
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