The web2py request work flow runs the model files first, then the controller, then renders the view. I had a similar problem, the only way I could figure out how to change the menu after the model files have run was to add a menu update function to the model and call it from the controller when necessary.
- [web2py] Menus in the model don't update at the right time... Jason Brower
- [web2py] Re: Menus in the model don't update at the righ... ron_m
- [web2py] Re: Menus in the model don't update at the righ... Anthony