Contributors mailing list archives

Re: How can I write all the cache?

Camptocamp SA, Guewen Baconnier
- 23/10/2015 11:09:55
On Wed, Oct 21, 2015 at 9:37 AM, Yajo <> wrote:
I'm doing a test where I need to imitate the onchange behavior, so:

with self.env.do_in_onchange():
    self.onefield = "blahblah"

But when one exits the with block, that data is not written to DB. I'm looking for some kind of self.env.cache.write_to_db(). Do you know of any?

Post to:

You should be able to do something like: