Because: (1) the upgrade starts by committing the current cursor; then
(2) the upgrade instanciates a new registry to use for the database; and
(3) the test cleanup involves setting up the old registry, which creates
a new environment referring to the new registry!
The points (2) and (3) makes the field setup crash when it relies on
data stored on the registry itself: the field in the old registry tries
to set up with data stored on the old registry.
closesodoo/odoo#48920
X-original-commit: f5e5aba9e203b42b661cc3b503fd37051ec20f93
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>