From c3e7fa0e04c9b6cbb22bae4291a8a0b8d4fd6143 Mon Sep 17 00:00:00 2001 From: Romain Derie Date: Mon, 3 Oct 2022 09:39:13 +0000 Subject: [PATCH] [IMP] web_unsplash: allow to configure app id in settings Since it was introduced with [1], only the key could be added in the settings, but not the app id. Still, both are needed to actually use unsplash, otherwise it won't work and the media dialog will keep showing the crendentials part, where one can also add its credentials. Basically, without the app id field, the access key field was useless in the settings. [1]: https://github.com/odoo/enterprise/commit/88746157ca16af4033576361dddae0b694aca70d task-3004144 closes odoo/odoo#102000 X-original-commit: fa45712eecd2a0fbf6236f611ddffd0b5e81dc31 Signed-off-by: Quentin Smetz (qsm) Signed-off-by: Romain Derie (rde) --- addons/web_unsplash/models/res_config_settings.py | 1 + addons/web_unsplash/views/res_config_settings_view.xml | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/addons/web_unsplash/models/res_config_settings.py b/addons/web_unsplash/models/res_config_settings.py index 2eca06a5f41..3136eaef7fe 100644 --- a/addons/web_unsplash/models/res_config_settings.py +++ b/addons/web_unsplash/models/res_config_settings.py @@ -7,3 +7,4 @@ class ResConfigSettings(models.TransientModel): _inherit = 'res.config.settings' unsplash_access_key = fields.Char("Access Key", config_parameter='unsplash.access_key') + unsplash_app_id = fields.Char("Application ID", config_parameter='unsplash.app_id') diff --git a/addons/web_unsplash/views/res_config_settings_view.xml b/addons/web_unsplash/views/res_config_settings_view.xml index 2588cebd337..fa289da726c 100644 --- a/addons/web_unsplash/views/res_config_settings_view.xml +++ b/addons/web_unsplash/views/res_config_settings_view.xml @@ -11,6 +11,10 @@