Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
5109 Weergaven

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!

Avatar
Annuleer
Beste antwoord

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

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
1
okt. 17
42865
1
dec. 15
10045
1
mrt. 23
2250
0
dec. 22
2894
0
jun. 21
2881