Odoo Help


problem in inheriting product.product

Hachem Chraiti
on 4/18/14, 12:37 PM 1,793 views

Hi, when i try to inherit product.product it shows me ana error: ProgrammingError: column product_product.name does not exist LINE 1: SELECT product_product."name",product_product."price",produc...

my code is: class cloud_meter(osv.osv): _name = 'cloud.meter' _inherit ="product.product" _columns = { 'name' : fields.char("Meter Name",size=64,required=True), 'unit': fields.selection((('image','image'),('instance','instance'), ('B','B'),('MB','MegaByte'),('GB','GegaByte'),('packets','packets'),('%','Percentage'),('vcpu','Nomber of VSCPUs'),('Network','network'),('IP','Ip adresses')),"Unit",required=True, select=True), 'price':fields.char("Price",size=64), 'type': fields.selection((('image','image'),('gauge','gauge'), ('cumulative','cumulative'),('delta','delta')),"Type",required=True, select=True), 'project':fields.many2one('res.partner','project'), 'ressource':fields.many2one('cloud.resource','ressource'), 'statistic':fields.one2many('cloud.statistic','meter',string='Statistics'), 'invoice_ids': fields.many2many( 'account.invoice', 'relation_table_invoice_meter', 'id_meter', 'id_invoice', string="Invoices" ),


_rec_name = 'name'


Roc cheng
On 4/21/14, 8:01 AM

Hi,The field 'unit' and 'type' which's required=True,In your code,you haven't set the defualt to them like:

 _defaults = { 'Unit': 'image'....

so the exist product records have null field 'unit' and 'type' Hope it will help you


Atul Kumar jain

--Atul Kumar jain--
Atul Kumar jain
| 5 3 7
Indore, India
--Atul Kumar jain--


Atul Kumar jain
On 4/19/14, 5:13 AM

Try to install this module in newly created database


Med Said BARA

--Med Said BARA--
Med Said BARA
| 5 5 7
--Med Said BARA--
Med Said BARA
On 4/18/14, 2:36 PM

Maybe, you've made some changes in your file after install and did not restart the server.

You can also try without restart by deleting the .pyc filles from your module and reinstall.

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


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 4/18/14, 12:37 PM
Seen: 1793 times
Last updated: 3/16/15, 8:10 AM