Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
14200 มุมมอง

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.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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.

อวตาร
ละทิ้ง
ผู้เขียน

Thanks, you’ve helped make it clearer.