When the registry is not ready, allow modifications of the selections
The following use case must reset the values:
- removing a selection on a custom field via studio
- changing the static selection definition and updating the module
The value must NOT be reset when:
- trying to remove manually a base field
- updating a module without all override being computed yet
(i.e. install)
Fully replacing the selections in an override should not happen
Instead of relying on the context, check if the registry is ready
before marking the selections as to remove.
If a static selection is removed and the module updated, it will be
removed correctly during the _process_end method as the selections
will not be present in pool.loaded_xmlids
Before this commit, updating a module A was doing a SET NULL for
selection values added by a module B via a selection_add
closesodoo/odoo#35871
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Co-authored-by: Martin Trigaux <mat@odoo.com>