Hide menu options

Hello, I would like to propose an improvement (if possible) for future versions of the tryton SAO.

The upgrade consists of the MENU.

  • When opening a menu option (example: party) and then opening any other (Example: SALE) the one that was opened first (Party) is not hidden. This makes working a bit overwhelming because the menus keep opening up with a very long list and it makes the work a bit difficult.

I don’t know if it is possible to do this.

Thank you

This is usually called an accordion menu.
I think we must be careful because such design tends to require more clicks from the user than without.
So I think we should make it smart for example it could happen only if there is a scrollbar with the current nodes expanded.
If we implement it, I think the feature should be generic for any tree view. Also I think we should define the depth level to consider a node to be in the “accordion”. For example we may want that the behavior applies only to top-level nodes so other nodes are collapsed if the user expand a new top-level node. But this could be done also for the second level.

So I think the configuration could be done in the xml like this:

<tree accordion="2">
    <field />

What would be a level 1 and a level 2 for you? because I think the best thing would be to change the model: party, sale, purchase …

Accordion of level 1 would collapse other node of the first level if a new node of level 1 is expanded.
Accordion of level 2 is the same but when a node of level 2 or another node of level 1 is expanded.

In the image I indicate that it is the 1,2,3 accordion … am I wrong? It is that I do not quite understand for you that it is a level 1 or a 2.


No this is the idea.

So I understand that if you have a level 2 accordion open, for example Party - Parties and you open Product - Products, this first (Party) would be hidden leaving only Product?

Yes but also with level 1. The level 2 will make that if you first expand the"Products" menu and then expand “Categories”, the “Products” will be collapsed but not if the level is 1.

OKAY! it seems perfect!

Now it would only be necessary to enter this version 5.8 hehehe