[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) <qsm@odoo.com> Signed-off-by: Romain Derie (rde) <rde@odoo.com>
This commit is contained in:
@@ -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')
|
||||
|
||||
@@ -11,6 +11,10 @@
|
||||
<label for="unsplash_access_key" class="o_light_label"/>
|
||||
<field name="unsplash_access_key"/>
|
||||
</div>
|
||||
<div class="content-group">
|
||||
<label for="unsplash_app_id" class="o_light_label"/>
|
||||
<field name="unsplash_app_id"/>
|
||||
</div>
|
||||
<div>
|
||||
<a href="https://www.odoo.com/documentation/master/applications/websites/website/optimize/unsplash.html#generate-an-unsplash-access-key" class="oe_link" target="_blank">
|
||||
<i class="fa fa-arrow-right"/> Generate an Access Key
|
||||
|
||||
Reference in New Issue
Block a user