[MIG] base_exception_user: bump version, add unit tests

H7674
This commit is contained in:
Cedric Collins
2022-01-14 17:31:02 -06:00
committed by Salomon Chambi
parent a8709fc316
commit ab33759618
10 changed files with 194 additions and 1 deletions

View File

@@ -0,0 +1,17 @@
# Copyright 2017 ACSONE SA/NV (<http://acsone.eu>)
# Copyright 2020 Hibou Corp.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
def setup_test_model(env, model_clses):
model_names = set()
for model_cls in model_clses:
model = model_cls._build_model(env.registry, env.cr)
model_names.add(model._name)
env.registry.setup_models(env.cr)
env.registry.init_models(
env.cr,
model_names,
dict(env.context, update_custom_fields=True),
)