From 986415cf050efbd38a5834f9bbd3a37db1fd7933 Mon Sep 17 00:00:00 2001
From: qsm-odoo <qsm@odoo.com>
Date: Wed, 16 Oct 2019 12:29:51 +0000
Subject: [PATCH] [REF] website: install theme_default on first website by
 default

The original goal was to not have any pre-installed theme by default
and to force the user to consider installing one through the customize
dialog.

Now that we have a system to allow switching theme, it is better to have
one installed by default and allow the user to switch theme from the
customize dialog (note that last part was made in the parent commit with
the merge of website_theme_install into website).

Note: theme_default is purely empty, it is only installed by default for
clarity in the theme selection screen, for the default website.
---
 addons/theme_default/__manifest__.py             | 4 +++-
 addons/theme_default/data/theme_default_data.xml | 8 ++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)
 create mode 100644 addons/theme_default/data/theme_default_data.xml

diff --git a/addons/theme_default/__manifest__.py b/addons/theme_default/__manifest__.py
index 0d469b7b1983..27f523834a77 100644
--- a/addons/theme_default/__manifest__.py
+++ b/addons/theme_default/__manifest__.py
@@ -8,11 +8,13 @@
     'sequence': 1000,
     'version': '1.0',
     'depends': ['website'],
-    'data': [
+    'demo': [
+        'data/theme_default_data.xml',
     ],
     'images': [
         'static/description/cover.png',
         'static/description/theme_default_screenshot.jpg',
     ],
     'application': False,
+    'auto_install': True,
 }
diff --git a/addons/theme_default/data/theme_default_data.xml b/addons/theme_default/data/theme_default_data.xml
new file mode 100644
index 000000000000..c9393015f4ab
--- /dev/null
+++ b/addons/theme_default/data/theme_default_data.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+
+<record id="website.default_website" model="website">
+    <field name="theme_id" ref="base.module_theme_default"/>
+</record>
+
+</odoo>
-- 
GitLab