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

I am trying to get selections for multiple fields from the same method, but I don't find the way to pass the values:

_columns = { 
    'x_standard': fields.selection(selection='_get_selection', string='Standards', required=1),
    'x_pressure': fields.selection(selection='_get_selection', string='Pressure', required=1),
}
def _get_selection(fieldname):
    selection = []
    if fieldname=='x_stanadard':
        selection=[('xxx','xxx')]
    elif fieldname=='x_pressure':
        selection=[('yyy','yyy')]
    return selection

Thanks for any help!

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
3
sep. 25
17418
1
mrt. 15
9805
1
dec. 24
1866
0
jun. 19
4060
1
aug. 18
8395