I am working with odoo 16.
I want to force my selection fields to be with one of the value that i have already populated it with.
I have tried to do it as another article was showing as
self.my_selection_fields = 'MyValueAlreadyInMyField"
but when i do that i get the following error :
UncaughtPromiseError > OwlError
Promesse non interceptée > An error occured in the owl lifecycle (see this Error's "cause" property)
OwlError: An error occured in the owl lifecycle (see this Error's "cause" property)
OwlError@http://localhost:8069/web/assets/1516-9251e20/web.assets_common.min.js:1240:1
handleError@http://localhost:8069/web/assets/1516-9251e20/web.assets_common.min.js:1472:101
handleError@http://localhost:8069/web/assets/1516-9251e20/web.assets_common.min.js:2099:29
_render@http://localhost:8069/web/assets/1516-9251e20/web.assets_common.min.js:1497:19
render@http://localhost:8069/web/assets/1516-9251e20/web.assets_common.min.js:1495:6
initiateRender@http://localhost:8069/web/assets/1516-9251e20/web.assets_common.min.js:1563:47
Caused by: TypeError: this.options.find(...) is undefined
get string@http://localhost:8069/web/assets/1517-50327a3/web.assets_backend.min.js:3670:161
template@http://localhost:8069/web/assets/1516-9251e20/web.assets_common.min.js line 2057 > Function:15:18
_render@http://localhost:8069/web/assets/1516-9251e20/web.assets_common.min.js:1496:96
render@http://localhost:8069/web/assets/1516-9251e20/web.assets_common.min.js:1495:6
initiateRender@http://localhost:8069/web/assets/1516-9251e20/web.assets_common.min.js:1563:47
(The anwsers is 7 years old so maybe something has changed https://www.odoo.com/fr_FR/forum/aide-1/change-the-value-of-a-fields-selection-102419)