[FIX] theme_*: call _generate_primary_templates before importing data

To make sure the required primary templates have been generated from
the theme's manifest when inherited views are imported/updated, this
commit triggers their generation from a first imported XML file.

This has been added to all themes for consistency, even the ones that
do not require it currently.

Related to https://github.com/odoo/odoo/pull/148443

task-3670496

X-original-commit: 22abe61eaf
Part-of: odoo/design-themes#761
This commit is contained in:
Benoit Socias
2024-01-08 14:57:17 +01:00
parent 51c310c785
commit 9c0707ceac
54 changed files with 270 additions and 0 deletions
+1
View File
@@ -7,6 +7,7 @@
'version': '2.1.0',
'depends': ['theme_common'],
'data': [
'data/generate_primary_template.xml',
'data/ir_asset.xml',
'views/images_content.xml',
'views/images_library.xml',
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Generate primary snippet templates that are not predefined -->
<function model="ir.module.module" name="_generate_primary_snippet_templates">
<value eval="[ref('base.module_theme_anelusia')]"/>
</function>
</odoo>
+1
View File
@@ -7,6 +7,7 @@
'version': '2.1.0',
'depends': ['theme_common'],
'data': [
'data/generate_primary_template.xml',
'data/ir_asset.xml',
'views/images.xml',
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Generate primary snippet templates that are not predefined -->
<function model="ir.module.module" name="_generate_primary_snippet_templates">
<value eval="[ref('base.module_theme_artists')]"/>
</function>
</odoo>
+1
View File
@@ -6,6 +6,7 @@
'sequence': 150,
'version': '2.0.0',
'data': [
'data/generate_primary_template.xml',
'data/ir_asset.xml',
'views/images_library.xml',
'views/customizations.xml',
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Generate primary snippet templates that are not predefined -->
<function model="ir.module.module" name="_generate_primary_snippet_templates">
<value eval="[ref('base.module_theme_avantgarde')]"/>
</function>
</odoo>
+1
View File
@@ -7,6 +7,7 @@
'version': '1.0.0',
'depends': ['theme_common'],
'data': [
'data/generate_primary_template.xml',
'data/ir_asset.xml',
'views/images_library.xml',
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Generate primary snippet templates that are not predefined -->
<function model="ir.module.module" name="_generate_primary_snippet_templates">
<value eval="[ref('base.module_theme_aviato')]"/>
</function>
</odoo>
+1
View File
@@ -7,6 +7,7 @@
'version': '2.1.0',
'depends': ['theme_common'],
'data': [
'data/generate_primary_template.xml',
'data/ir_asset.xml',
'views/images.xml',
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Generate primary snippet templates that are not predefined -->
<function model="ir.module.module" name="_generate_primary_snippet_templates">
<value eval="[ref('base.module_theme_beauty')]"/>
</function>
</odoo>
+1
View File
@@ -7,6 +7,7 @@
'version': '2.1.0',
'depends': ['theme_common'],
'data': [
'data/generate_primary_template.xml',
'data/ir_asset.xml',
'views/image_content.xml',
'views/customizations.xml',
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Generate primary snippet templates that are not predefined -->
<function model="ir.module.module" name="_generate_primary_snippet_templates">
<value eval="[ref('base.module_theme_bewise')]"/>
</function>
</odoo>
+1
View File
@@ -7,6 +7,7 @@
'version': '2.0.0',
'depends': ['theme_common'],
'data': [
'data/generate_primary_template.xml',
'data/ir_asset.xml',
'views/images_library.xml',
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Generate primary snippet templates that are not predefined -->
<function model="ir.module.module" name="_generate_primary_snippet_templates">
<value eval="[ref('base.module_theme_bistro')]"/>
</function>
</odoo>
+1
View File
@@ -7,6 +7,7 @@
'version': '2.1.0',
'depends': ['theme_common'],
'data': [
'data/generate_primary_template.xml',
'data/ir_asset.xml',
'views/images.xml',
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Generate primary snippet templates that are not predefined -->
<function model="ir.module.module" name="_generate_primary_snippet_templates">
<value eval="[ref('base.module_theme_bookstore')]"/>
</function>
</odoo>
+1
View File
@@ -7,6 +7,7 @@
'version': '1.0.0',
'depends': ['website'],
'data': [
'data/generate_primary_template.xml',
'data/ir_asset.xml',
'views/images_library.xml',
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Generate primary snippet templates that are not predefined -->
<function model="ir.module.module" name="_generate_primary_snippet_templates">
<value eval="[ref('base.module_theme_buzzy')]"/>
</function>
</odoo>
+1
View File
@@ -7,6 +7,7 @@
'version': '2.1.0',
'depends': ['theme_common'],
'data': [
'data/generate_primary_template.xml',
'data/ir_asset.xml',
'views/image_content.xml',
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Generate primary snippet templates that are not predefined -->
<function model="ir.module.module" name="_generate_primary_snippet_templates">
<value eval="[ref('base.module_theme_clean')]"/>
</function>
</odoo>
+1
View File
@@ -7,6 +7,7 @@
'version': '2.0.0',
'depends': ['website'],
'data': [
'data/generate_primary_template.xml',
'data/ir_asset.xml',
'views/images.xml',
'views/customizations.xml',
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Generate primary snippet templates that are not predefined -->
<function model="ir.module.module" name="_generate_primary_snippet_templates">
<value eval="[ref('base.module_theme_cobalt')]"/>
</function>
</odoo>
+1
View File
@@ -7,6 +7,7 @@
'version': '2.0.0',
'depends': ['theme_common'],
'data': [
'data/generate_primary_template.xml',
'data/ir_asset.xml',
'views/snippets_options.xml',
'views/image_library.xml',
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Generate primary snippet templates that are not predefined -->
<function model="ir.module.module" name="_generate_primary_snippet_templates">
<value eval="[ref('base.module_theme_enark')]"/>
</function>
</odoo>
+1
View File
@@ -6,6 +6,7 @@
'sequence': 110,
'version': '2.0.0',
'data': [
'data/generate_primary_template.xml',
'data/ir_asset.xml',
'views/images_library.xml',
'views/customizations.xml',
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Generate primary snippet templates that are not predefined -->
<function model="ir.module.module" name="_generate_primary_snippet_templates">
<value eval="[ref('base.module_theme_graphene')]"/>
</function>
</odoo>
+1
View File
@@ -7,6 +7,7 @@
'version': '2.0.0',
'depends': ['theme_common'],
'data': [
'data/generate_primary_template.xml',
'data/ir_asset.xml',
'views/images_content.xml',
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Generate primary snippet templates that are not predefined -->
<function model="ir.module.module" name="_generate_primary_snippet_templates">
<value eval="[ref('base.module_theme_kea')]"/>
</function>
</odoo>
+1
View File
@@ -7,6 +7,7 @@
'version': '2.1.0',
'depends': ['theme_common'],
'data': [
'data/generate_primary_template.xml',
'data/ir_asset.xml',
'views/images_library.xml',
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Generate primary snippet templates that are not predefined -->
<function model="ir.module.module" name="_generate_primary_snippet_templates">
<value eval="[ref('base.module_theme_kiddo')]"/>
</function>
</odoo>
+1
View File
@@ -7,6 +7,7 @@
'version': '2.1.0',
'depends': ['theme_common'],
'data': [
'data/generate_primary_template.xml',
'data/ir_asset.xml',
'views/images_content.xml',
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Generate primary snippet templates that are not predefined -->
<function model="ir.module.module" name="_generate_primary_snippet_templates">
<value eval="[ref('base.module_theme_loftspace')]"/>
</function>
</odoo>
+1
View File
@@ -7,6 +7,7 @@
'version': '2.0.0',
'depends': ['theme_common'],
'data': [
'data/generate_primary_template.xml',
'data/ir_asset.xml',
'views/images_content.xml',
'views/customizations.xml',
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Generate primary snippet templates that are not predefined -->
<function model="ir.module.module" name="_generate_primary_snippet_templates">
<value eval="[ref('base.module_theme_monglia')]"/>
</function>
</odoo>
+1
View File
@@ -7,6 +7,7 @@
'version': '2.0.0',
'depends': ['theme_common'],
'data': [
'data/generate_primary_template.xml',
'data/ir_asset.xml',
'views/images_library.xml',
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Generate primary snippet templates that are not predefined -->
<function model="ir.module.module" name="_generate_primary_snippet_templates">
<value eval="[ref('base.module_theme_nano')]"/>
</function>
</odoo>
+1
View File
@@ -7,6 +7,7 @@
'version': '2.1.0',
'depends': ['theme_common'],
'data': [
'data/generate_primary_template.xml',
'data/ir_asset.xml',
'views/images_library.xml',
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Generate primary snippet templates that are not predefined -->
<function model="ir.module.module" name="_generate_primary_snippet_templates">
<value eval="[ref('base.module_theme_notes')]"/>
</function>
</odoo>
+1
View File
@@ -7,6 +7,7 @@
'version': '2.1.0',
'depends': ['theme_common'],
'data': [
'data/generate_primary_template.xml',
'data/ir_asset.xml',
'views/images.xml',
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Generate primary snippet templates that are not predefined -->
<function model="ir.module.module" name="_generate_primary_snippet_templates">
<value eval="[ref('base.module_theme_odoo_experts')]"/>
</function>
</odoo>
+1
View File
@@ -7,6 +7,7 @@
'version': '2.0.0',
'depends': ['theme_common'],
'data': [
'data/generate_primary_template.xml',
'data/ir_asset.xml',
'views/images.xml',
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Generate primary snippet templates that are not predefined -->
<function model="ir.module.module" name="_generate_primary_snippet_templates">
<value eval="[ref('base.module_theme_orchid')]"/>
</function>
</odoo>
+1
View File
@@ -7,6 +7,7 @@
'version': '2.1.0',
'depends': ['website'],
'data': [
'data/generate_primary_template.xml',
'data/ir_asset.xml',
'views/images.xml',
'views/customizations.xml',
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Generate primary snippet templates that are not predefined -->
<function model="ir.module.module" name="_generate_primary_snippet_templates">
<value eval="[ref('base.module_theme_paptic')]"/>
</function>
</odoo>
+1
View File
@@ -7,6 +7,7 @@
'version': '2.0.0',
'depends': ['theme_common'],
'data': [
'data/generate_primary_template.xml',
'data/ir_asset.xml',
'views/images.xml',
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Generate primary snippet templates that are not predefined -->
<function model="ir.module.module" name="_generate_primary_snippet_templates">
<value eval="[ref('base.module_theme_real_estate')]"/>
</function>
</odoo>
+1
View File
@@ -7,6 +7,7 @@
'version': '2.0.0',
'depends': ['theme_common'],
'data': [
'data/generate_primary_template.xml',
'data/ir_asset.xml',
'views/images_library.xml',
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Generate primary snippet templates that are not predefined -->
<function model="ir.module.module" name="_generate_primary_snippet_templates">
<value eval="[ref('base.module_theme_treehouse')]"/>
</function>
</odoo>
+1
View File
@@ -7,6 +7,7 @@
'version': '2.0.0',
'depends': ['theme_common'],
'data': [
'data/generate_primary_template.xml',
'data/ir_asset.xml',
'views/images.xml',
'views/customizations.xml',
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Generate primary snippet templates that are not predefined -->
<function model="ir.module.module" name="_generate_primary_snippet_templates">
<value eval="[ref('base.module_theme_vehicle')]"/>
</function>
</odoo>
+1
View File
@@ -7,6 +7,7 @@
'version': '2.0.0',
'depends': ['theme_common'],
'data': [
'data/generate_primary_template.xml',
'data/ir_asset.xml',
'views/images.xml',
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Generate primary snippet templates that are not predefined -->
<function model="ir.module.module" name="_generate_primary_snippet_templates">
<value eval="[ref('base.module_theme_yes')]"/>
</function>
</odoo>
+1
View File
@@ -7,6 +7,7 @@
'version': '2.0.0',
'depends': ['theme_common'],
'data': [
'data/generate_primary_template.xml',
'data/ir_asset.xml',
'views/images_library.xml',
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Generate primary snippet templates that are not predefined -->
<function model="ir.module.module" name="_generate_primary_snippet_templates">
<value eval="[ref('base.module_theme_zap')]"/>
</function>
</odoo>