Skip to Content
मेन्यू
This question has been flagged
1 Reply
1299 Views

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
Discard
Author 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
Discard
Related Posts Replies Views Activity
1
दिस॰ 18
5668
0
जून 21
6949
1
नव॰ 22
7045
1
अक्तू॰ 21
3996
2
नव॰ 18
10833