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
Atsakyti
2518
Rodiniai
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!
Registracija| Related Posts | Replies | Rodiniai | Veikla | |
|---|---|---|---|---|
|
|
1
gruod. 18
|
7058 | ||
|
|
0
birž. 21
|
8128 | ||
|
|
1
lapkr. 22
|
10150 | ||
|
|
1
spal. 21
|
5814 | ||
|
|
2
lapkr. 18
|
13024 |