someDiv
diff --git a/addons/web/static/tests/views/form/form_view_tests.js b/addons/web/static/tests/views/form/form_view_tests.js
index 3a3bfb3d311..d14b4bd64d3 100644
--- a/addons/web/static/tests/views/form/form_view_tests.js
+++ b/addons/web/static/tests/views/form/form_view_tests.js
@@ -294,6 +294,31 @@ QUnit.module("Views", (hooks) => {
assert.containsNone(target, "label.o_form_label_empty:contains(timmy)");
});
+ QUnit.test("form rendering with class and style attributes", async (assert) => {
+ await makeView({
+ type: "form",
+ resModel: "partner",
+ serverData,
+ arch: /* xml */ `
`,
+ resId: 2,
+ });
+ assert.containsNone(
+ target,
+ ".o_view_controller[style*='border: 1px solid red;'], .o_view_controller [style*='border: 1px solid red;']",
+ "style attribute should not be copied"
+ );
+ assert.containsOnce(
+ target,
+ ".o_view_controller.o_form_view.myCustomClass",
+ "class attribute should be passed to the view controller"
+ );
+ assert.containsOnce(
+ target,
+ ".myCustomClass",
+ "class attribute should ONLY be passed to the view controller"
+ );
+ });
+
QUnit.test("generic tags are case insensitive", async function (assert) {
await makeView({
type: "form",
diff --git a/addons/web/static/tests/views/kanban_view_tests.js b/addons/web/static/tests/views/kanban_view_tests.js
index 58e06b34f44..23f3a30a937 100644
--- a/addons/web/static/tests/views/kanban_view_tests.js
+++ b/addons/web/static/tests/views/kanban_view_tests.js
@@ -365,6 +365,36 @@ QUnit.module("Views", (hooks) => {
assert.containsOnce(target, ".o_kanban_record:contains(gnap)");
});
+ QUnit.test("kanban rendering with class and style attributes", async (assert) => {
+ await makeView({
+ type: "kanban",
+ resModel: "partner",
+ serverData,
+ arch: /* xml */ `
+
+
+
+
+
+ `,
+ });
+ assert.containsNone(
+ target,
+ ".o_view_controller[style*='border: 1px solid red;'], .o_view_controller [style*='border: 1px solid red;']",
+ "style attribute should not be copied"
+ );
+ assert.containsOnce(
+ target,
+ ".o_view_controller.o_kanban_view.myCustomClass",
+ "class attribute should be passed to the view controller"
+ );
+ assert.containsOnce(
+ target,
+ ".myCustomClass",
+ "class attribute should ONLY be passed to the view controller"
+ );
+ });
+
QUnit.test("generic tags are case insensitive", async function (assert) {
await makeView({
type: "kanban",
diff --git a/addons/web/static/tests/views/list_view_tests.js b/addons/web/static/tests/views/list_view_tests.js
index e47e7567280..6b6d9b6cacb 100644
--- a/addons/web/static/tests/views/list_view_tests.js
+++ b/addons/web/static/tests/views/list_view_tests.js
@@ -438,15 +438,32 @@ QUnit.module("Views", (hooks) => {
}
});
- QUnit.test("list with class", async function (assert) {
+ QUnit.test("list with class and style attributes", async function (assert) {
await makeView({
type: "list",
resModel: "foo",
serverData,
- arch: '
',
+ arch: /* xml */ `
+
+
+
+ `,
});
-
- assert.hasClass(target.querySelector(".o_list_renderer"), "myClass");
+ assert.containsNone(
+ target,
+ ".o_view_controller[style*='border: 1px solid red;'], .o_view_controller [style*='border: 1px solid red;']",
+ "style attribute should not be copied"
+ );
+ assert.containsOnce(
+ target,
+ ".o_view_controller.o_list_view.myClass",
+ "class attribute should be passed to the view controller"
+ );
+ assert.containsOnce(
+ target,
+ ".myClass",
+ "class attribute should ONLY be passed to the view controller"
+ );
});
QUnit.test('list with create="0"', async function (assert) {
@@ -11484,7 +11501,7 @@ QUnit.module("Views", (hooks) => {
assert.containsNone(target, ".o_dialog", "should not display an invalid field dialog");
assert.strictEqual(target.querySelector(".o_data_row .o_data_cell").innerText, "10");
- // edit again with an invalid value
+ // edit again with an invalid value
await click(rows[0].querySelector(".o_data_cell"));
target.querySelector(".o_data_row .o_data_cell input").value = "oof2";
await triggerEvents(target, ".o_data_row .o_data_cell input", ["input"]);
diff --git a/addons/web_tour/static/src/tour_service/tour_utils.js b/addons/web_tour/static/src/tour_service/tour_utils.js
index d261e1a766a..3ccecaa662d 100644
--- a/addons/web_tour/static/src/tour_service/tour_utils.js
+++ b/addons/web_tour/static/src/tour_service/tour_utils.js
@@ -658,7 +658,7 @@ export const stepUtils = {
{
content: "wait for cancellation to complete",
trigger:
- ".o_list_view, .o_form_view > div > div > .o_form_readonly, .o_form_view > div > div > .o_form_saved",
+ ".o_view_controller.o_list_view, .o_form_view > div > div > .o_form_readonly, .o_form_view > div > div > .o_form_saved",
run() {},
auto: true,
},
diff --git a/odoo/addons/base/tests/test_res_config.py b/odoo/addons/base/tests/test_res_config.py
index 94e37f158c2..b0ad82ed070 100644
--- a/odoo/addons/base/tests/test_res_config.py
+++ b/odoo/addons/base/tests/test_res_config.py
@@ -112,7 +112,7 @@ class TestResConfig(TransactionCase):
arch = self.env['res.config.settings'].get_view(view.id)['arch']
tree = etree.fromstring(arch)
self.assertTrue(tree.xpath("""
- //form[@class="oe_form_configuration o_base_settings"]
+ //form[@class="oe_form_configuration"]
/app[@name="foo"]
"""), 'The res.config.settings form view architecture is not what is expected by the web client.')
diff --git a/odoo/addons/base/views/res_config_settings_views.xml b/odoo/addons/base/views/res_config_settings_views.xml
index 6f0b2b4bc99..a4b24794a73 100644
--- a/odoo/addons/base/views/res_config_settings_views.xml
+++ b/odoo/addons/base/views/res_config_settings_views.xml
@@ -5,7 +5,7 @@
res.config.settings.view.form
res.config.settings
-