[FIX] account: ensure cleanup of registry after test_all_l10n

Followup of #48896, ensures that the registry is correctly cleaned up
after the installation of the different l10n_* modules and that the
subsequent setup_models is done with the correct registry

closes odoo/odoo#49197

X-original-commit: bfd6bdcd89724f04442bbe07307177c523bed5f0
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
This commit is contained in:
Adrian Torres
2020-04-08 09:11:24 +00:00
parent 74f8e8825c
commit 00c82d3121
@@ -20,6 +20,13 @@ class TestAllL10n(SingleTransactionCase):
@classmethod
def setUpClass(cls):
super(TestAllL10n, cls).setUpClass()
# the installation of l10n_* modules below instanciates a NEW registry, so we
# have to restore the old one in order to perform the cleanups
@cls.addClassCleanup
def cleanup():
cls.registry.registries[cls.registry.db_name] = cls.registry
l10n_mods = cls.env['ir.module.module'].search([
('name', 'like', 'l10n%'),
('state', '=', 'uninstalled'),