summaryrefslogtreecommitdiff
path: root/addons/website_theme_install
diff options
context:
space:
mode:
authoreco-odoo <eco@odoo.com>2018-07-20 14:09:27 +0200
committerYannick Tivisse <yti@odoo.com>2018-08-10 16:08:47 +0200
commit89e358caa8627c5eff21ee63015dece0997db2b4 (patch)
tree8534521fd812ec993c31d6cc0271bdb213d94d00 /addons/website_theme_install
parent33dee649a891fc5e0385862cfdc0890b000749f2 (diff)
[FIX] onboarding: Fix/Update onboarding to v2.0
Specification ============= - Fix lots of bug due to the BS4 migration - Improve steps - Validate some steps (Like the company configuration) in all the onboarding bars if done in one onboarding bar. - Only animate the confetti one time if a step is done, instead of on each view loading For more information, see: https://www.odoo.com/web#id=1869513&action=333&active_id=965&model=project.task&view_type=form&menu_id=4720
Diffstat (limited to 'addons/website_theme_install')
-rw-r--r--addons/website_theme_install/models/__init__.py1
-rw-r--r--addons/website_theme_install/models/res_company.py28
-rw-r--r--addons/website_theme_install/views/views.xml11
3 files changed, 0 insertions, 40 deletions
diff --git a/addons/website_theme_install/models/__init__.py b/addons/website_theme_install/models/__init__.py
index 480a1b847c7..de58fda6e31 100644
--- a/addons/website_theme_install/models/__init__.py
+++ b/addons/website_theme_install/models/__init__.py
@@ -2,4 +2,3 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import ir_module_module
-from . import res_company
diff --git a/addons/website_theme_install/models/res_company.py b/addons/website_theme_install/models/res_company.py
deleted file mode 100644
index ce1e3e719a7..00000000000
--- a/addons/website_theme_install/models/res_company.py
+++ /dev/null
@@ -1,28 +0,0 @@
-# -*- coding: utf-8 -*-
-# Part of Odoo. See LICENSE file for full copyright and licensing details.
-
-from odoo import api, fields, models
-from ast import literal_eval
-
-
-class ResCompany(models.Model):
- _inherit = 'res.company'
-
- def _compute_website_theme_onboarding_done(self):
- """ The step is marked as done if one theme is installed. """
- # we need the same domain as the existing action
- action = self.env.ref('website_theme_install.theme_install_kanban_action').read()[0]
- domain = literal_eval(action['domain'])
- domain.append(('state', '=', 'installed'))
- installed_themes_count = self.env['ir.module.module'].sudo().search_count(domain)
- for record in self:
- record.website_theme_onboarding_done = (installed_themes_count > 0)
-
- website_theme_onboarding_done = fields.Boolean("Onboarding website theme step done",
- compute='_compute_website_theme_onboarding_done')
-
- @api.model
- def action_open_website_theme_selector(self):
- action = self.env.ref('website_theme_install.theme_install_kanban_action').read()[0]
- action['target'] = 'new'
- return action
diff --git a/addons/website_theme_install/views/views.xml b/addons/website_theme_install/views/views.xml
index 4ccb733a4e0..3b6cd89db61 100644
--- a/addons/website_theme_install/views/views.xml
+++ b/addons/website_theme_install/views/views.xml
@@ -95,15 +95,4 @@ action = {
<a href="/web#action=website_theme_install.theme_install_kanban_action">See themes here</a>
</xpath>
</template>
- <!-- ONBOARDING -->
- <template id="onboarding_website_theme_step">
- <t t-call="base.onboarding_step">
- <t t-set="title">Website Theme</t>
- <t t-set="description">Select a theme for your wonderful website.</t>
- <t t-set="btn_text">Let's start!</t>
- <t t-set="method" t-value="'action_open_website_theme_selector'" />
- <t t-set="model" t-value="'res.company'" />
- <t t-set="done" t-value="company.website_theme_onboarding_done" />
- </t>
- </template>
</odoo>