Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
763 Vizualizări

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?

Imagine profil
Abandonează
Autor Cel mai bun răspuns

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')
Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
dec. 18
5176
0
iun. 21
6360
1
nov. 22
5616
1
oct. 21
3289
2
nov. 18
10198