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?
Pertanyaan ini telah diberikan tanda
1
Balas
2507
Tampilan
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')
Menikmati diskusi? Jangan hanya membaca, ikuti!
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
Daftar| Post Terkait | Replies | Tampilan | Aktivitas | |
|---|---|---|---|---|
|
|
1
Des 18
|
7049 | ||
|
|
0
Jun 21
|
8124 | ||
|
|
1
Nov 22
|
10149 | ||
|
|
1
Okt 21
|
5813 | ||
|
|
2
Nov 18
|
13023 |