跳至内容
菜单
此问题已终结
1 回复
13893 查看

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.