Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
884 มุมมอง

I created a record table A and created a sub table B of A, and later created a sub table C for sub table B. When I created and saved the records of sub table C, I was informed that, Record does not exist or has been deleted, I checked and it was a cache error, but I couldn't find the problem. Can someone help me? thanks

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

model:

class ModelA(models.model):     
​_name = 'model.a'

line_ids = fields.One2many('model.b', 'a_id', string="Detail")

class ModelB(models.model):     
​_name = 'model.b'

a_id = fields.many2one('model.a', string="Head")​
line_ids = fields.One2many('model.c', 'b_id', string="Detail")

class ModelC(models.model):     
​_name = 'model.c'

​b_id = fields.many2one('model.b', string="Head")​​
line_ids = fields.One2many('model.b', 'a_id', string="Detail")


อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
Automatic Batch Transfer แก้ไขแล้ว
1
ส.ค. 25
503
1
พ.ค. 25
1304
0
พ.ย. 24
1407
2
ต.ค. 24
1490
0
ส.ค. 24
1247