Help

2

How can I add some properties to product in V7?

Avatar
Cristian

Hi, I am working in a store and its products need some extra properties. For example, for each music album needs Author, Year, Label. Furthermore, the point of sales needs to search by all those properties.

I will wondering if there is any way to do that. Is there any Apps? Should I do it myself?.

I know there is "Variants" for products but It is not exactly that I need.

I hope to get some help or advice.

Regards, Cristian

Avatar
Discard
3 Answers
2
Best Answer

Hi,

you must inherit product.product class and add fields you want to add in python and xml files.

For the search, you just have to override the function name_get by add the contained of field you add.

Bye

Avatar
Discard
1
Avatar
xiaolong97427
Best Answer

I can't post link, but search here (help.openerp.com) for : " How to add extra fields to a model? "

1 Comment
Avatar
Discard
Avatar
Cristian
-

it looks like the Xiaolong's link. I tried to add the new Field in the Database Structure -> Models but It throws an error: assert self._rec_name in self._columns.keys() + ['id'], "Invalid rec_name %s for model %s" % (self._rec_name, self._name) AssertionError: Invalid rec_name name for model product.product. Searching in the web seems to be a bug

0
Avatar
fenshuajiang
Best Answer

use model "product_variant_multi"

2 Comments
Avatar
Discard
Avatar
xiaolong97427
-

Yes it's a possibility as well, but the module is not compatible with V7 yet. I trying to install and facing a lot of problem.

Avatar
Jay
-

Just tested out product_multi_variant, don't think it is fully ported to v7, nor think it is the right answer to Cristian. Correct me if I am wrong.

Cristian, I feel your question is similar to mine link:[http://help.openerp.com/question/1652/any-existing-addon-can-solve-my-problem-sales-analysis-based-on-products-multi-attributes/]. Take a look and comment back if you want.