← Back to team overview

openerp-dev-web team mailing list archive

Alteration to the handling of the menu URL and ?db=True

 

To deal with a conflicts between hash-urls and the login page (which would redirect to the page pointed to by the hash-url, without all the menu and chrome and URLs) I expanded (and replaced) the old ?db parameter to menu:

* menu now takes an optional `next` parameter (so ?next=url) which is the URL of the document which will be loaded at the opening of the menu page/template.
* In the `menu.mako` template, the content of the `next` URL parameter is stored in the `load_content` Mako template variable. If there was no next, ${load_content} is simply an empty string.
* ?db=True has been replaced by ?next=/openerp/home (well except in reality /openerp/home is urlencoded)
* I also used that function for the handling of the parent action on the applications menu, most of that logic is now handled by the Python code which then provides the right URL to load.

Precedence notes:

1. If there is a hash-url, we load that
2. Otherwise, if there is a ?next URL parameter, we load its content
3. Otherwise, if there is an action on the currently selected application menu, we execute it
4. Otherwise we don't do anything

So don't be surprised if you see some things working a bit differently, and don't hesitate to tell me (or check) if that seems to have introduced weird behaviors.

Xavier