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

Hello,

I am wondering if there is any way I can create a field which will hold the content from my foods and combos models?

I want to give the user the possibility to either select a food or a combo from the same menu, and then wring up the nutritional data for whatever was selected, but I am stuck because I don't know how to populate a field with data from 2 separate models.

Any tip will be appreciated,

Thanks!

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

Hi,

add a field selection with values combo and foods

2 fields many2one with relation foods and combo

a field function that display the nutritial value

an onchange on field selection depending the 2 many2one fields with return False to the non selected many2one and become invisible.

bye

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
How to use compute with One2many? แก้ไขแล้ว
1
ต.ค. 17
42849
1
ธ.ค. 15
10029
1
มี.ค. 23
2218
0
ธ.ค. 22
2860
0
มิ.ย. 21
2865