[FIX]DBFilter From Config : even on conf, do not cache other domains

Because user can come with its own selected first.
This commit is contained in:
Fabien BOURGEOIS 2022-04-18 08:32:57 +02:00
parent 8767b1aaeb
commit f5d90d83cf
2 changed files with 3 additions and 3 deletions

View File

@ -27,7 +27,7 @@
Also required : `proxy_mode` to `True` Also required : `proxy_mode` to `True`
Inspired from OCA `dbfilter_from_header`.""", Inspired from OCA `dbfilter_from_header`.""",
'version': '12.0.0.0.5', 'version': '12.0.0.0.6',
'category': 'Yaltik', 'category': 'Yaltik',
'author': 'Fabien Bourgeois', 'author': 'Fabien Bourgeois',
'license': 'AGPL-3', 'license': 'AGPL-3',

View File

@ -50,10 +50,10 @@ def db_filter(dbs, httprequest=None):
if host == http_host: if host == http_host:
dbs = [i for i in dbs if match(database, i)] dbs = [i for i in dbs if match(database, i)]
break break
if http_host not in http_host_resolv:
http_host_resolv[http_host] = dbs
else: else:
dbs = db_filter_odoo(dbs, httprequest) dbs = db_filter_odoo(dbs, httprequest)
if http_host not in http_host_resolv:
http_host_resolv[http_host] = dbs
else: else:
dbs = db_filter_odoo(dbs, httprequest) dbs = db_filter_odoo(dbs, httprequest)
return dbs return dbs