[IMP] tree_but_open - persist values in context

**v8.0 equivalent of** #3654

Actually I've made this change in v7.0 as we are working with v7.0.  In this commit I've just tried to adapt changes to v8.0. So please review the v7.0 pull request #3654 first, then this one.

 On branch 8.0
 Changes to be committed:

	modified:   addons/web/controllers/main.py