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.


Import data from CSV

Dr Obx
on 10/20/15, 10:11 AM 374 views


Got 2 classes, some data are loaded into the class_1 some into class_2, class_2 contain 1 many2one and required fields

class_1 contain one2many.

loading data from CSV and everything seems to be ok but ....

Until I'm not trying to display it as a one2many.

Placed separately on the page displayed correctly so apparently data stored as it should be.

Once I put it into <tree> won't display a bit :(


#--------------- Class 2----------------

class class2(models.Model):

_name = 'class2'

_description = 'Class 2'

item_order_line = fields.Many2one('class1','Item')

item_id = fields.Char('Item Number')

item_title = fields.Char('Item Title')

quantity_ordered = fields.Integer('Quantity')

sale_price = fields.Char('Sale Price')

#----------------- Class 1 -----------------

class class1(models.Model):

_name = 'class1'

_description = 'Class 1'

_inherit = ['class2']

#------------------ o2m -----------------

order_line = fields.One2many('class2','item_order_line',string='Order Lines')


What I'm doing wrong ? Why I can see data in table ?

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: 10/20/15, 10:11 AM
Seen: 374 times
Last updated: 10/20/15, 11:38 AM