[IMP] tree_but_open - persist values in context

v8.0 equivalent of #3654

 On branch 8.0
 Changes to be committed:

	modified:   addons/web/controllers/main.py