diff --git a/addons/web/static/src/views/kanban/kanban_controller.js b/addons/web/static/src/views/kanban/kanban_controller.js
index 63a4f76a4a6..26387658bc9 100644
--- a/addons/web/static/src/views/kanban/kanban_controller.js
+++ b/addons/web/static/src/views/kanban/kanban_controller.js
@@ -84,7 +84,7 @@ export class KanbanController extends Component {
return {
activeFields: archInfo.activeFields,
progressAttributes: archInfo.progressAttributes,
- fields,
+ fields: { ...fields },
resModel,
handleField: archInfo.handleField,
limit: archInfo.limit || limit,
diff --git a/addons/web/static/tests/views/fields/properties_field_tests.js b/addons/web/static/tests/views/fields/properties_field_tests.js
index 0ad4f8b87d2..7397b992230 100644
--- a/addons/web/static/tests/views/fields/properties_field_tests.js
+++ b/addons/web/static/tests/views/fields/properties_field_tests.js
@@ -11,6 +11,7 @@ import {
patchWithCleanup,
triggerEvent,
} from "@web/../tests/helpers/utils";
+import { createWebClient, doAction } from "@web/../tests/webclient/helpers";
import { Many2XAutocomplete } from "@web/views/fields/relational_utils";
import { makeView, setupViewRegistries } from "@web/../tests/views/helpers";
import { SelectCreateDialog } from "@web/views/view_dialogs/select_create_dialog";
@@ -1356,6 +1357,44 @@ QUnit.module("Fields", (hooks) => {
assert.equal(items.length, 2);
});
+ /**
+ * Check that the properties are shown when switching view.
+ */
+ QUnit.test("properties: switch view", async function (assert) {
+ serverData.views = {
+ "partner,false,search": ``,
+ "partner,99,kanban": `
+
+
+
+
+
+
+
+
+
+ `,
+ "partner,100,list": `
+
+
+
`,
+ };
+ const wc = await createWebClient({ serverData });
+ await doAction(wc, {
+ res_model: "partner",
+ type: "ir.actions.act_window",
+ views: [
+ [false, "kanban"],
+ [false, "list"],
+ ],
+ });
+
+ await click(target, ".o_switch_view.o_list");
+ assert.ok(target.querySelector(".o_optional_columns_dropdown"),
+ "Properties should be added as optional columns."
+ );
+ });
+
/**
* Test the behavior of the default value. It should be propagated on the property
* value only when we create a new property. If the property already exists, and we