跳至內容
選單
此問題已被標幟
1 回覆
5060 瀏覽次數

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

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
10月 17
42843
1
12月 15
10020
1
3月 23
2214
0
12月 22
2858
0
6月 21
2861