Odoo Help


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.


Add product attributes via custom module?

on 8/4/14, 5:38 AM 766 views

Hi all,

I'm trying to add product.attributes to my products via my own module, but I'm lost.

I've found the product.attribute class in /addons/product/product.py but theres no documentation on how to add them.

I'm trying to add them to my product.template custom module ( i've extend the product.template class )

I've tried: self.pool.get('product.attribute').write() but that didn't work. The attributes are not showing up by the product and can't be found under: Sales > Configuration > Product categories & Attributes > Attributes.

i'm using the new odoo V8 version.


Ludo - Neobis

--Ludo - Neobis--
| 2 2 5
Hoogvliet, Netherlands
--Ludo - Neobis--


Ludo - Neobis
On 8/4/14, 6:10 AM

Not quite sure what you are trying to achieve here? Do you want to add new fields, such as "name" and others?

If so, just follow this guide:


If you want to actually create the records for products in a database, you should use the create function, i.e. "self.pool.get('product.product').create(vals).


First example is something like

class myproduct(model.Models)

    _name = 'product.product'

    _inherit = 'product.product'

    some_prop = fields.Char(string = 'Some property')

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)


Asked: 8/4/14, 5:38 AM
Seen: 766 times
Last updated: 3/16/15, 8:10 AM