Files
design-themes/theme_vehicle/__manifest__.py
T
Benoit Socias 7b27828755 [FIX] theme_*: register unused configurator snippets
When shapes were extracted to configurator snippets in [1], some
configurator-specific snippets were created that do not appear on pages
of the specific theme.
Because in [2] the call to `_generate_primary_snippet_templates` is done
on a full list of themes instead of only the installed ones, the problem
was not noticed: if any theme defines a block, it's website-side
configurator-specific template is generated.
This is not the case during an upgrade: the templates are generated only
for the installed themes. Because of this some "useless" configurator
templates trigger an error when importing their XML definition because
their parent template does not exist.

This commit fixes this by adding those templates in a pseudo page `_` in
the `configurator_snippets` entry of each theme's manifest.
In master, the templates will be removed instead.

[1]: https://github.com/odoo/design-themes/commit/d206c119720d557c11320ebb3d7339890b8f9efa
[2]: https://github.com/odoo/odoo/commit/928eeca714a161f6bc03343e4dc8af9b050b9841#diff-f49a1e9eda23df9f1d48121ba376a5fabafe70ea18b29d4eab23d737e5d4eeb6R446

closes odoo/design-themes#751

Related: odoo/odoo#144222
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-12-01 18:14:15 +00:00

48 lines
2.0 KiB
Python

{
'name': 'Vehicle Theme',
'description': 'Vehicle Theme - Cars, Motorbikes, Bikes, Tires',
'category': 'Theme/Services',
'summary': 'Vehicle, Cars, Motorbikes, Bikes, Tires, Transports, Repair, Mechanics, Garages, Sports, Services',
'sequence': 300,
'version': '2.0.0',
'depends': ['theme_common'],
'data': [
'data/ir_asset.xml',
'views/images.xml',
'views/customizations.xml',
'views/new_page_template.xml',
],
'images': [
'static/description/vehicle_description.png',
'static/description/vehicle_screenshot.png',
],
'images_preview_theme': {
'website.s_cover_default_image': '/theme_vehicle/static/src/img/snippets/s_cover.jpg',
'website.s_text_image_default_image': '/theme_vehicle/static/src/img/snippets/s_text_image.jpg',
'website.s_masonry_block_default_image_1': '/theme_vehicle/static/src/img/snippets/s_masonry_block.jpg',
'website.s_image_text_default_image': '/theme_vehicle/static/src/img/snippets/s_image_text.jpg',
'website.s_parallax_default_image': '/theme_vehicle/static/src/img/snippets/s_parallax.jpg',
'website.s_picture_default_image': '/theme_vehicle/static/src/img/snippets/s_picture.jpg',
},
'configurator_snippets': {
'homepage': ['s_cover', 's_text_image', 's_image_text', 's_picture', 's_masonry_block', 's_call_to_action'],
# TODO In master, remove unused templates instead.
'_': ['s_numbers', 's_references'],
},
'new_page_templates': {
'about': {
'personal': ['s_text_cover', 's_image_text', 's_text_block_h2', 's_numbers', 's_features', 's_call_to_action'],
},
'team': {
'5': ['s_text_block_h1', 's_text_block', 's_image_gallery', 's_picture'],
},
},
'license': 'LGPL-3',
'live_test_url': 'https://theme-vehicle.odoo.com',
'assets': {
'website.assets_editor': [
'theme_vehicle/static/src/js/tour.js',
],
}
}