Skip to Content
Menú
This question has been flagged
1 Respondre
776 Vistes

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
Descartar
Autor Best Answer

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
Descartar
Related Posts Respostes Vistes Activitat
1
de des. 18
5181
0
de juny 21
6365
1
de nov. 22
5634
1
d’oct. 21
3299
2
de nov. 18
10203