Skip to Content
Menu
This question has been flagged
1 Reply
5546 Views

hi all,

I have 3 levels of Categories like below:


-Electronics

--Computer

---Desktops

---Laptops

---Notebooks


-Beverages

--Drinks

---Soft Drinks

---Beer

---Juice


-Bakery

--Cake

---Chocolate

---Pineapple


Model 1 for first level : Categories  -> Electronics, Beverages, Bakery  etc.

Model 2 for second level: Subcategories  -> Computer, Drinks, Cake  etc.


Created Many2one and One2many relationship between Models Categories and SubCategories with View (xml), it works fine like a Master-Detail (Form view for Categories and Tree view editable="bottom" for SubCategories), how I can manage and create data entry VIEW for third level which is based on SubCategories ( say: subsubcategory model like a Master-Detail-Detail view ) or i can manage this in same SubCategories model. please help to have a working example with a link for guide & example and/or some guidance.

regards


Avatar
Discard
Best Answer

Hi,

Instead of adding multiple models for this, handle with single model itself using parent_id field which is a many2one field to same model to specify the parent of the category.

You can refer the product category model or partner to see how it is handled.

Thanks

Avatar
Discard
Author

hi, thanks for help :)

Hi. I'm trying to do something similar, but am new to Odoo. I am a programer by long-ago trade, but can use Studio. I think I just need to know where to go.

I just want to see my products by category/sub-category/product.

Example:

Category 1

Subcategory A

Product 1

Product 2

Subcategory B

Product 3

Product 4

Category 2

Subcategory C

Product 5

Product 6

Related Posts Replies Views Activity
1
Nov 24
1484
1
Nov 24
1192
2
Sep 24
1047
1
Aug 24
2453
3
Aug 24
2687