From 9fbed7fe9cc9d3c985d9a4a1124a5a901f44583a Mon Sep 17 00:00:00 2001 From: fkantelberg Date: Fri, 10 May 2024 10:19:12 +0200 Subject: [PATCH] Fix model init for res.company. Bump version --- src/doblib/__init__.py | 2 +- src/doblib/module.py | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/doblib/__init__.py b/src/doblib/__init__.py index 7d785f0..85cdcf4 100644 --- a/src/doblib/__init__.py +++ b/src/doblib/__init__.py @@ -1 +1 @@ -VERSION = "0.18.0" +VERSION = "0.18.1" diff --git a/src/doblib/module.py b/src/doblib/module.py index b75afa5..5acc2ba 100644 --- a/src/doblib/module.py +++ b/src/doblib/module.py @@ -183,14 +183,15 @@ def update_changed(self, db_name, blacklist=None): with self.env(db_name, False) as env: model = env["ir.module.module"] if hasattr(model, "upgrade_changed_checksum"): - # Initialize `res.partner` and `res.users` to prevent exceptions - # caused by the fetching of user data inside of the decorator + # Initialize `res.company`, `res.partner` and `res.users` to prevent + # exceptions caused by the fetching of user data inside of the decorator # `assert_log_admin_access`. Exceptions occur if an existing module - # adds a new field to `res.users` which gets loaded inside of python - # but doesn't link to a column in the database - utils.info("Initializing the `res.users` models") + # adds a new field to `res.company`, `res.partner` or `res.users` which + # gets loaded inside of python but doesn't link to a column in the + # database + utils.info("Initializing the `res.users` and `res.company` models") env.registry.init_models( - env.cr, ["res.partner", "res.users"], env.context + env.cr, ["res.company", "res.partner", "res.users"], env.context ) model.upgrade_changed_checksum(True)