I created a selection field in odoo :
commercial_group =
fields.Selection([('1GB_dynPool_Plus_LTE','1GB_dynPool_Plus_LTE'),
('1GB_EU_dynPool_Plus_LTE', '1GB_EU_dynPool_Plus_LTE'),
('3GB_dynPool_Plus_LTE', '3GB_dynPool_Plus_LTE'),
('5GB_dynPool_Plus_LTE', '5GB_dynPool_Plus_LTE')], string='Commercial Group')
And I would like to populate this field with the value which i am getting from api like this :
record.sudo().create({"id" : count,
"commercial_group": commercial_group.text, // **Here commercial_group.text=5GB_dynPool_Plus_LTE**
})
But i get an error. What is the right way to populate a selection field Dynamically??
many2one
field insteadselection
field and give itselection widget
orno_create
andno_edit
option as True - khelili miliana