Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
5610 Widoki

Hi everyone,


I have a tree view that is grouped by 2 fields, by default. I want the groups to be fully expanded when someone opens the view.

When I use the expanded=1 attribute in the tree tag, only the first group-by level is expanded (as is explicit in the official documentation).

How can I make the tree fully expanded by default? I can't find any examples anywhere. Is it possible?

Thanks!

Awatar
Odrzuć
Najlepsza odpowiedź

I was just looking for the same thing. I found web_groupby_expand but that only goes up to version 13 (and will break your server if you install it on 14+). After a bit more digging I found that there is a similar, but maintained, module called web_group_expand in the OCA repo https://github.com/OCA/web/tree/14.0/web_group_expand


Note that it's for version 14, but that's better than trying the one for 13 (which is for sure going to break your site).

Basically what this module does is it adds 2 buttons in tree views, one to expand all and one to collapse all.

By "all" it actually expands the next groupation, so if you have 3 nested groupations you're gonna have to click 3 times but that's much better as I found no alternative.

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
paź 22
3465
2
mar 15
6247
1
cze 25
1877
3
lip 25
3484
1
maj 25
1611