From f5d90d83cfbf1f0c11360ae0487de8ce28716579 Mon Sep 17 00:00:00 2001 From: Fabien BOURGEOIS Date: Mon, 18 Apr 2022 08:32:57 +0200 Subject: [PATCH] [FIX]DBFilter From Config : even on conf, do not cache other domains Because user can come with its own selected first. --- dbfilter_from_config/__manifest__.py | 2 +- dbfilter_from_config/override.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dbfilter_from_config/__manifest__.py b/dbfilter_from_config/__manifest__.py index 2a97aae..8882a44 100644 --- a/dbfilter_from_config/__manifest__.py +++ b/dbfilter_from_config/__manifest__.py @@ -27,7 +27,7 @@ Also required : `proxy_mode` to `True` Inspired from OCA `dbfilter_from_header`.""", - 'version': '12.0.0.0.5', + 'version': '12.0.0.0.6', 'category': 'Yaltik', 'author': 'Fabien Bourgeois', 'license': 'AGPL-3', diff --git a/dbfilter_from_config/override.py b/dbfilter_from_config/override.py index d262b54..433e3c8 100644 --- a/dbfilter_from_config/override.py +++ b/dbfilter_from_config/override.py @@ -50,10 +50,10 @@ def db_filter(dbs, httprequest=None): if host == http_host: dbs = [i for i in dbs if match(database, i)] break + if http_host not in http_host_resolv: + http_host_resolv[http_host] = dbs else: dbs = db_filter_odoo(dbs, httprequest) - if http_host not in http_host_resolv: - http_host_resolv[http_host] = dbs else: dbs = db_filter_odoo(dbs, httprequest) return dbs