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?
This question has been flagged
1
Odgovori
2513
Prikazi
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')
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Prijavi| Related Posts | Odgovori | Prikazi | Aktivnost | |
|---|---|---|---|---|
|
|
1
dec. 18
|
7053 | ||
|
|
0
jun. 21
|
8126 | ||
|
|
1
nov. 22
|
10150 | ||
|
|
1
okt. 21
|
5814 | ||
|
|
2
nov. 18
|
13023 |