diff --git a/dbfilter_from_header/README.rst b/dbfilter_from_header/README.rst index a411b9856..a6450fbca 100644 --- a/dbfilter_from_header/README.rst +++ b/dbfilter_from_header/README.rst @@ -2,10 +2,13 @@ dbfilter_from_header ==================== -.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:22bc0211cbcfa8a8b2fe917f6ee9fe9b0d49fb441013d10553fddcb8167483c9 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status @@ -14,16 +17,16 @@ dbfilter_from_header :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github - :target: https://github.com/OCA/server-tools/tree/15.0/dbfilter_from_header + :target: https://github.com/OCA/server-tools/tree/16.0/dbfilter_from_header :alt: OCA/server-tools .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/server-tools-15-0/server-tools-15-0-dbfilter_from_header + :target: https://translation.odoo-community.org/projects/server-tools-16-0/server-tools-16-0-dbfilter_from_header :alt: Translate me on Weblate -.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/149/15.0 - :alt: Try me on Runbot +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/server-tools&target_branch=16.0 + :alt: Try me on Runboat -|badge1| |badge2| |badge3| |badge4| |badge5| +|badge1| |badge2| |badge3| |badge4| |badge5| This addon lets you pass a dbfilter as a HTTP header. @@ -78,8 +81,8 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. -If you spotted it first, help us smashing it by providing a detailed and welcomed -`feedback `_. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -119,6 +122,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/server-tools `_ project on GitHub. +This module is part of the `OCA/server-tools `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/dbfilter_from_header/__manifest__.py b/dbfilter_from_header/__manifest__.py index 789ff70a5..72cc9b4c6 100644 --- a/dbfilter_from_header/__manifest__.py +++ b/dbfilter_from_header/__manifest__.py @@ -6,7 +6,7 @@ { "name": "dbfilter_from_header", "summary": "Filter databases with HTTP headers", - "version": "15.0.1.0.0", + "version": "16.0.1.0.0", "website": "https://github.com/OCA/server-tools", "author": "Therp BV, Odoo Community Association (OCA)", "license": "AGPL-3", diff --git a/dbfilter_from_header/i18n/dbfilter_from_header.pot b/dbfilter_from_header/i18n/dbfilter_from_header.pot index a11baf5cd..78d58d53f 100644 --- a/dbfilter_from_header/i18n/dbfilter_from_header.pot +++ b/dbfilter_from_header/i18n/dbfilter_from_header.pot @@ -3,7 +3,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 15.0\n" +"Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" diff --git a/dbfilter_from_header/i18n/es_AR.po b/dbfilter_from_header/i18n/es_AR.po index 4b37bb93d..e69de29bb 100644 --- a/dbfilter_from_header/i18n/es_AR.po +++ b/dbfilter_from_header/i18n/es_AR.po @@ -1,14 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 15.0\n" -"Report-Msgid-Bugs-To: \n" -"Last-Translator: Automatically generated\n" -"Language-Team: none\n" -"Language: es_AR\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" diff --git a/dbfilter_from_header/override.py b/dbfilter_from_header/override.py index b7cde207d..f759575b1 100644 --- a/dbfilter_from_header/override.py +++ b/dbfilter_from_header/override.py @@ -12,9 +12,9 @@ from odoo.tools import config db_filter_org = http.db_filter -def db_filter(dbs, httprequest=None): - dbs = db_filter_org(dbs, httprequest) - httprequest = httprequest or http.request.httprequest +def db_filter(dbs, host=None): + dbs = db_filter_org(dbs, host) + httprequest = http.request.httprequest db_filter_hdr = httprequest.environ.get("HTTP_X_ODOO_DBFILTER") if db_filter_hdr: dbs = [db for db in dbs if re.match(db_filter_hdr, db)] diff --git a/dbfilter_from_header/static/description/index.html b/dbfilter_from_header/static/description/index.html index 607a244df..942695b1f 100644 --- a/dbfilter_from_header/static/description/index.html +++ b/dbfilter_from_header/static/description/index.html @@ -1,20 +1,20 @@ - + - + dbfilter_from_header