diff --git a/click_odoo_contrib/update.py b/click_odoo_contrib/update.py index aefb708..b241ddf 100644 --- a/click_odoo_contrib/update.py +++ b/click_odoo_contrib/update.py @@ -280,6 +280,7 @@ def _update_db( @contextmanager def OdooEnvironmentWithUpdate(database, ctx, **kwargs): + threading.current_thread().dbname = database # Watch for database locks while Odoo updates watcher = None if ctx.params["watcher_max_seconds"] > 0: