I have made two drop-downs. Second dropdown's data is dependent on first drop-down's chosen value.
I have tried multiple methods, but didn't find any relevant solution.
Those are my three lists:
SELECTION_LIST = (('sela','Selected a'), ('selb','Selected b')) SELECTION_LIST_2 = (('selc','Selected c'), ('seld','Selected d')) SELECTION_LIST_3 = (('sele','Selected e'), ('self','Selected f'))
And I defined my fields this way:
'type_selection': fields.selection( [ ('selection1', 'Selection 1'), ('selection2', 'Selection 2'), ('selection3', 'Selection 3'), ], 'Category 1', required=False), 'type_selection_2': fields.selection( type_selection={ 'selection1': [{SELECTION_LIST}], 'selection2': [{SELECTION_LIST_2}], 'selection3': [{SELECTION_LIST_3}], }, "Category 2", required=False)
Unfortunately I get an error.