콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다

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 ?

아바타
취소
관련 게시물 답글 화면 활동
1
9월 15
8135
2
5월 23
2524
0
2월 18
3277
3
1월 18
17222
1
12월 22
16659