Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
7104 Widoki

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


Awatar
Odrzuć

if it is not working then try this,

employee.identification_id = 3435323423

Najlepsza odpowiedź

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.

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
maj 24
6105
1
sty 20
5803
1
sty 16
3344
0
wrz 15
3749
0
sie 15
4272