Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How to get a collapse/expand product categories view?

By
Pascal Tremblay
on 9/2/16, 5:41 PM 485 views

Hello all,

We are on Odoo 8.

In the chart of accounts view, we can collapse or expand the view.

In the product categories view, even if we modify the action view type for "tree", lines are not collapsible and not expandable. All the categories appears.

How to get the same view than "chart of accounts" in the "product categories" view?

Thanks to help.







EDIT #1

Where is the code who makes that little triangles appear in the "chart of accounts" view? May be I could imitate this code for my "product categories".




1

Pascal Tremblay

--Pascal Tremblay--
1312
| 5 2 7
Alma, Canada
--Pascal Tremblay--


Pascal Tremblay
On 9/3/16, 3:53 PM

Here is our answer to this problem. It works now!


In the view product.product_category_list_view

Here, modify this field :

Child Field (field_parent) = child_id


In the product.product_category_action_form

Here modify these fields :

View Type (view_type) = Tree

Domain Value (domain) = [('parent_id','=',False)]


Result

Now we have the little expand/collapse triangles at the left of our categories


Thanks for sharing!

Ermin Trevisan
on 9/4/16, 2:26 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 9/2/16, 5:41 PM
Seen: 485 times
Last updated: 11/30/16, 5:24 AM