コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
7117 ビュー

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.

アバター
破棄
関連投稿 返信 ビュー 活動
2
5月 24
6126
1
1月 20
5825
1
1月 16
3351
0
9月 15
3755
0
8月 15
4279