# Hide menu options

**URL:** https://discuss.tryton.org/t/hide-menu-options/3395
**Category:** Ideas
**Created:** [October 26, 2020, 9:49am UTC](https://discuss.tryton.org/t/hide-menu-options/3395 "2020-10-26T09:49:55Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![osloar](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/osloar/32/599_2.png) [@osloar](https://discuss.tryton.org/u/osloar)
#### Post date: [October 26, 2020, 9:49am UTC](https://discuss.tryton.org/t/hide-menu-options/3395/1 "2020-10-26T09:49:55Z")

</div>

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

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [October 26, 2020, 8:56pm UTC](https://discuss.tryton.org/t/hide-menu-options/3395/2 "2020-10-26T20:56:43Z")

</div>

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:

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

```

---

<div class="post-metadata">

### Author: ![osloar](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/osloar/32/599_2.png) [@osloar](https://discuss.tryton.org/u/osloar)
#### Post date: [October 26, 2020, 9:24pm UTC](https://discuss.tryton.org/t/hide-menu-options/3395/3 "2020-10-26T21:24:26Z")

</div>

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 …

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [October 26, 2020, 10:40pm UTC](https://discuss.tryton.org/t/hide-menu-options/3395/4 "2020-10-26T22:40:25Z")

</div>

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.  
etc.

---

<div class="post-metadata">

### Author: ![osloar](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/osloar/32/599_2.png) [@osloar](https://discuss.tryton.org/u/osloar)
#### Post date: [October 27, 2020, 8:28am UTC](https://discuss.tryton.org/t/hide-menu-options/3395/5 "2020-10-27T08:28:46Z")

</div>

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.

Thanks

 ![acordion_menu](https://discuss-cdn.tryton.org/uploads/default/original/2X/6/6388dfa0d73a7965ad81b60b95fe20641a38fed3.png)

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [October 27, 2020, 9:00am UTC](https://discuss.tryton.org/t/hide-menu-options/3395/6 "2020-10-27T09:00:12Z")

</div>

> [@osloar](#):
>
> In the image I indicate that it is the 1,2,3 accordion … am I wrong?

No this is the idea.

---

<div class="post-metadata">

### Author: ![osloar](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/osloar/32/599_2.png) [@osloar](https://discuss.tryton.org/u/osloar)
#### Post date: [October 27, 2020, 2:00pm UTC](https://discuss.tryton.org/t/hide-menu-options/3395/7 "2020-10-27T14:00:38Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [October 27, 2020, 2:31pm UTC](https://discuss.tryton.org/t/hide-menu-options/3395/8 "2020-10-27T14:31:02Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![osloar](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/osloar/32/599_2.png) [@osloar](https://discuss.tryton.org/u/osloar)
#### Post date: [October 27, 2020, 3:03pm UTC](https://discuss.tryton.org/t/hide-menu-options/3395/9 "2020-10-27T15:03:20Z")

</div>

OKAY! it seems perfect!

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