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

As far as I konw, flush() method updates the values from the cache to the database while 

self.env.cr.commit() allows us to commit changes to the database.

Imagine profil
Abandonează
Cel mai bun răspuns

In short, the changes applied to the database using flush() are visible only within that transaction/session and can be rolled back, if required. commit() does the final write to the database that makes the changes visible to everyone and cannot be rolled back.

Imagine profil
Abandonează
Autor

Thanks, you’ve helped make it clearer.