콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
7122 화면

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
6127
1
1월 20
5826
1
1월 16
3357
0
9월 15
3758
0
8월 15
4282