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?
Esta pregunta ha sido marcada
1
Responder
2515
Vistas
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')
¿Le interesa esta conversación? ¡Participe en ella!
Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.
Inscribirse| Publicaciones relacionadas | Respuestas | Vistas | Actividad | |
|---|---|---|---|---|
|
|
1
dic 18
|
7055 | ||
|
|
0
jun 21
|
8127 | ||
|
|
1
nov 22
|
10150 | ||
|
|
1
oct 21
|
5814 | ||
|
|
2
nov 18
|
13023 |