Skip to content
Snippets Groups Projects
Commit a9567a7f authored by Raphael Collet's avatar Raphael Collet Committed by Martin Trigaux
Browse files

[FIX] base: allow to remove fields when the registry is not ready


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

closes odoo/odoo#35871

Signed-off-by: default avatarRaphael Collet (rco) <rco@openerp.com>


Co-authored-by: default avatarMartin Trigaux <mat@odoo.com>
parent c2d4873e
Branches
Tags
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment