This question has been flagged
1 Reply
8955 Views

Hi

I want add one product in multiple category, but in product form its one2many field so how can i add multiple category to product

Avatar
Discard

did you mean product category? for eg: product: usb product, category:computer accesories.

Author

I mean product name : USB key board, category : Accessories ,Components it will be visible in both category

Best Answer

This confused me a bit as well at first because I wasn't thinking about it the same way as the OpenERP guys. Normally, we're all used to other interfaces where selecting multiple categories is done via checkboxes, so you get to put them anywhere you want. The OpenERP way is more structured and forces you to think about your categories differently than you might normally but I think if you get on board, you will see it makes a lot of sense the way OpenERP does it.

Truth is, your categories are already in multiple categories if you set you structure correctly. For example:

Products
Products -> Computers
Products -> Books
Products -> Computers -> Desktop
Products -> Computers -> Laptops
Products -> Computers -> Laptops -> Accessories
Products -> Computers -> Accessories

Now here I have set up several different categories in a structured format. For your keyboard, it is usable by both desktops and laptops so I would assign this the category Products -> Computers -> Accessories. So now this keyboard is a Product, it is a Computers, and it is an Accessories. It is in all three of those categories. If you filter your search results by any of those things, then you will see your keyboard as an option.

This is limiting in one big way. If, let's say, you have a book, Computer Network Management, and you want it under both Products -> Books and Products -> Computers -> Accessories then you can't. The possible solution is to rethink your category structure. If you only sell computer related books, then instead of Products -> Books, you could easily do Products -> Computers -> Books and now you have your books in a place that is defined just for book, but not in a separate top-level category. This would work for you. If you also sold fiction novels, this wouldn't work.

The other thing worth mentioning is that since you will control your portal for displaying these books to the customers, you can control the filtering as well. An example would be if the user clicks a button you call Computer Books, you can filter the results by Products -> Computers -> Books if that's what you want to display. And if the user clicks Fiction Books, you can filter by Products -> Books and then just separate your products.

It doesn't always work, but it's a very Amazon way of approaching it. If you look under the filter Computers on Amazon, you won't ever find any books. So they have no Products -> Computers -> Books anywhere in their structure. They do have Products -> Books -> Computers on the other hand where you will find their computer related books.

In summary, think about your structure first and see if this works for your use, many times I can see I'm just not structuring things correctly. In my case I was doing a certain split later on in the process but moving that split nearer to the top solved all my problems. In OpenERP, all the products are usually already in multiple categories, same as as most other things like Locations.

Avatar
Discard