Skip to Content
Menu
You need to be registered to interact with the community.
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
Opusti
Related Posts Odgovori Prikazi Aktivnost
1
sep. 15
7741
2
maj 23
2025
0
feb. 18
2879
3
jan. 18
16669
1
dec. 22
16172