Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
771 Prikazi

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
Opusti
Avtor 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
Opusti
Related Posts Odgovori Prikazi Aktivnost
1
dec. 18
5179
0
jun. 21
6364
1
nov. 22
5627
1
okt. 21
3294
2
nov. 18
10203