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

When I try to update a field before raising a UserError, the value doesn't get saved to the database. How can I ensure the field is saved even before the UserError is raised?

아바타
취소
작성자 베스트 답변

We can use 

self.env.cr.commit()

just before the UserError() to save the values.

Eg:

self.env.cr.commit()
raise UserError('Some issue has been occured')
아바타
취소
관련 게시물 답글 화면 활동
1
12월 18
5276
0
6월 21
6514
1
11월 22
5987
1
10월 21
3470
2
11월 18
10355