Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
1341 Tampilan

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?

Avatar
Buang
Penulis Jawaban Terbai

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')
Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
1
Des 18
5710
0
Jun 21
6989
1
Nov 22
7157
1
Okt 21
4076
2
Nov 18
10870