How can i define a dynamic selection field where the user can add new items that are not predefined this code define a static selection field:
score:field.selection([('key1','value1').....],string='score'),
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
How can i define a dynamic selection field where the user can add new items that are not predefined this code define a static selection field:
score:field.selection([('key1','value1').....],string='score'),
Hi, try this:
def _dinamic_selection(self):
list_field = []
# add elementos to list
return list_field
_columns = {
'field_selecction' : fields.selection('_dinamic_selection', 'Dinamic Field Selection'),
}
I hope you help, regards.
Luo tili jo tänään nauttiaksesi yksinoikeusominaisuuksista ja osallistuaksesi mahtavaan yhteisöömme!
RekisteröidyAiheeseen liittyviä artikkeleita | Vastaukset | Näkymät | Toimenpide | |
---|---|---|---|---|
|
3
helmik. 25
|
3147 | ||
|
0
toukok. 24
|
46 | ||
|
1
huhtik. 24
|
3160 | ||
|
4
syysk. 23
|
4612 | ||
|
1
elok. 23
|
2329 |