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

Suppose I have 2 model, M1 & M2.

M1 with 2 fields, M1F1 & M1F2, and has some records.

M2 has M2F1(M2O, related to M1F1), M2F2, and some other fields.

I'd like to let M2F2 autofill with the same record of M1F2.

How do I do that?


อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

If first field is Boolean for example:

1. var = fields.Boolean()

Second field will be:

2. var_related = fields.Boolean(related=model.name.var)

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
ส.ค. 24
992
Customer_rank and M2O field แก้ไขแล้ว
3
พ.ค. 23
2794
1
ธ.ค. 19
3460
1
ธ.ค. 15
13400
0
มี.ค. 15
3871