Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
777 Vues

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
Ignorer
Auteur Meilleure réponse

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
Ignorer
Publications associées Réponses Vues Activité
1
déc. 18
5181
0
juin 21
6365
1
nov. 22
5635
1
oct. 21
3299
2
nov. 18
10203