This question has been flagged

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




Avatar
Discard
Author Best Answer

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


Avatar
Discard

Thanks for sharing!

Best Answer

Here is complete information about the odoo hierarchic relations.

https://vishnuarukat.xyz/articles/odoo-hierarchic-relationships

Avatar
Discard

thanks for sharing

Naps get you did a great blog, that's why

On Mon, 11 Jun 2018, 9:39 p.m. napster, <vishnuaa007@gmail.com> wrote:

thanks for sharing


Sent by Odoo S.A. using Odoo.

#napster you did a great job! , this hell of forum giving 400 bad requests when I am editing prev comment.