Skip to Content
Menu
This question has been flagged

Guys,

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 :(

<pre>

#--------------- 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')

</pre>

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

Avatar
Discard
Related Posts Replies Views Activity
1
Sep 15
7252
2
May 23
1156
0
Feb 18
2580
3
Jan 18
15805
1
Dec 22
15453