diff --git a/addons/crm/static/src/js/tours/crm.js b/addons/crm/static/src/js/tours/crm.js
index 12366ffbd7b..33546ff7912 100644
--- a/addons/crm/static/src/js/tours/crm.js
+++ b/addons/crm/static/src/js/tours/crm.js
@@ -48,7 +48,7 @@ registry.category("web_tour.tours").add('crm_tour', {
run: "drag_and_drop_native .o_opportunity_kanban .o_kanban_group:eq(2) ",
}, {
// Choose the element that is not going to be moved by the previous step.
- trigger: ".o_opportunity_kanban .o_kanban_group:nth-child(2) .o_kanban_record:not(.o_updating) .o-mail-ActivityButton",
+ trigger: ".o_opportunity_kanban .o_kanban_group:nth-child(2) .o_kanban_record .o-mail-ActivityButton",
extra_trigger: ".o_opportunity_kanban",
content: markup(_t("Looks like nothing is planned. :(
Tip: Schedule activities to keep track of everything you have to do!")),
position: "bottom",
diff --git a/addons/crm/tests/test_crm_lead.py b/addons/crm/tests/test_crm_lead.py
index 45523210c36..4f3d406b193 100644
--- a/addons/crm/tests/test_crm_lead.py
+++ b/addons/crm/tests/test_crm_lead.py
@@ -814,6 +814,7 @@ class TestCRMLead(TestCrmCommon):
class TestLeadFormTools(FormatAddressCase):
def test_address_view(self):
+ self.env.company.country_id = self.env.ref('base.us')
self.assertAddressView('crm.lead')
diff --git a/addons/crm/tests/test_crm_lead_duplicates.py b/addons/crm/tests/test_crm_lead_duplicates.py
index b40c38e878b..473b83522a0 100644
--- a/addons/crm/tests/test_crm_lead_duplicates.py
+++ b/addons/crm/tests/test_crm_lead_duplicates.py
@@ -13,6 +13,9 @@ class TestCRMLead(TestCrmCommon):
def setUpClass(cls):
super().setUpClass()
+ # To avoid magic phone sanitization
+ cls.env.company.country_id = cls.env.ref('base.us')
+
cls.emails_provider_generic = {
('robert.poilvert@gmail.com', 'robert.poilvert@gmail.com'),
('fp@odoo.com', 'fp@odoo.com'),
diff --git a/addons/crm/tests/test_crm_pls.py b/addons/crm/tests/test_crm_pls.py
index da3409db2c3..eb05796708a 100644
--- a/addons/crm/tests/test_crm_pls.py
+++ b/addons/crm/tests/test_crm_pls.py
@@ -6,7 +6,7 @@ from datetime import timedelta
from odoo import tools
from odoo.addons.mail.tests.common import mail_new_test_user
from odoo.fields import Date
-from odoo.tests import Form, tagged, users
+from odoo.tests import Form, tagged, users, loaded_demo_data
from odoo.tests.common import TransactionCase
@@ -206,7 +206,12 @@ class TestCRMPLS(TransactionCase):
Lead._cron_update_automated_probabilities()
lead_13_no_team_proba = leads[13].automated_probability
self.assertTrue(lead_13_team_3_proba != leads[13].automated_probability, "Probability for leads with no team should be different than if they where in their own team.")
- self.assertEqual(tools.float_compare(lead_13_no_team_proba, 36.65, 2), 0)
+ # Todo: Make this test fully independent from demo data
+ if not loaded_demo_data(self.env):
+ expected_proba = 35.19
+ else:
+ expected_proba = 36.65
+ self.assertAlmostEqual(lead_13_no_team_proba, expected_proba, places=2)
# Test frequencies
lead_4_stage_0_freq = LeadScoringFrequency.search([('team_id', '=', leads[4].team_id.id), ('variable', '=', 'stage_id'), ('value', '=', stage_ids[0])])
diff --git a/addons/crm/tests/test_crm_ui.py b/addons/crm/tests/test_crm_ui.py
index 508045c9287..f662e972977 100644
--- a/addons/crm/tests/test_crm_ui.py
+++ b/addons/crm/tests/test_crm_ui.py
@@ -8,6 +8,28 @@ from odoo.tests.common import tagged
class TestUi(HttpCase):
def test_01_crm_tour(self):
+ # TODO: The tour is raising a JS error when selecting Brandon Freeman
+ # but with the demo data it succeeds to continue if there is already another lead
+ # in the pipe. Then the tour is using a record in the Qualified stage to create
+ # an activity, which is not existing without demo data as well
+ brandon = self.env["res.partner"].create({
+ 'name': 'Brandon Freeman',
+ 'email': 'brandon.freeman55@example.com',
+ 'phone': '(355)-687-3262',
+ })
+ self.env['crm.lead'].create([{
+ 'name': "Zizizbroken",
+ 'type': 'opportunity',
+ 'partner_id': brandon.id,
+ 'stage_id': self.env.ref('crm.stage_lead1').id,
+ 'user_id': self.env.ref('base.user_admin').id,
+ }, {
+ 'name': "Zizizbroken 2",
+ 'type': 'opportunity',
+ 'partner_id': brandon.id,
+ 'stage_id': self.env.ref('crm.stage_lead2').id,
+ 'user_id': self.env.ref('base.user_admin').id,
+ }])
self.start_tour("/web", 'crm_tour', login="admin")
def test_02_crm_tour_rainbowman(self):
diff --git a/addons/website_crm/tests/test_website_crm.py b/addons/website_crm/tests/test_website_crm.py
index c9b5a7d425a..a497c4f1a28 100644
--- a/addons/website_crm/tests/test_website_crm.py
+++ b/addons/website_crm/tests/test_website_crm.py
@@ -29,6 +29,10 @@ class TestWebsiteCrm(odoo.tests.HttpCase):
self.assertEqual(record.campaign_id.name, 'New campaign', 'Name of the "on the fly" created campaign is wrong')
def test_catch_logged_partner_info_tour(self):
+ self.env.ref('base.partner_admin').write({
+ 'name': 'Mitchell Admin',
+ 'company_name': 'YourCompany',
+ })
user_login = 'admin'
user_partner = self.env['res.users'].search([('login', '=', user_login)]).partner_id
partner_email = user_partner.email