*: website, web_unsplash, website_blog We have recently created an odoo media library that exposes a public API for searching for open-source media, including dynamic SVGs that can be used with the dynamic background-shape system to create illustrations whose colors can be changed by the user. This commit adds the corresponding client-side functionalty: search for the images in the media-library, creating a corresponding attachment when selected, as well as an option to customize the colors of the dynamic SVGs. In the process, adaptations have been made in the web_unsplash module to avoid duplicating code and to adapt code that was making assumptions that are no longer valid. To make new users more aware of this feature, all default images have been hidden from the media-dialog, so that the user is prompted so search for images. Some tests and tours that were relying on having default images in the media-dialog (eg in website_blog) have been adapted to match. task-2316651 Linked to: odoo/iap-apps#235 closes odoo/odoo#57888 X-original-commit: 7a1308b426f94b33e2bd55e5d58e661067e26ff3 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com> Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
20 lines
601 B
Python
20 lines
601 B
Python
# -*- coding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
import odoo.tests
|
|
from odoo import tools
|
|
|
|
|
|
@odoo.tests.tagged('post_install', '-at_install')
|
|
class TestUi(odoo.tests.HttpCase):
|
|
def test_admin(self):
|
|
self.env['blog.blog'].create({'name': 'Travel'})
|
|
self.env['ir.attachment'].create({
|
|
'public': True,
|
|
'type': 'url',
|
|
'url': '/web/image/123/transparent.png',
|
|
'name': 'transparent.png',
|
|
'mimetype': 'image/png',
|
|
})
|
|
self.start_tour("/", 'blog', login='admin')
|