Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
1105 Zobrazení

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
Zrušit
Autor Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
pro 18
5462
0
čvn 21
6721
1
lis 22
6519
1
říj 21
3733
2
lis 18
10590