[FIX] web: kanban in the quick create style issue

Before this commit
The quick create form view uses the new wowl form renderer, but
with the CSS style of the legacy form view.
This led to some issues, i.e. the width of some input fields
were ridiculously small.

After this commit
The quick create form view still uses the new form renderer, but with
the proper class "o_wowl_form_view" to ensure the proper style is
applied.

Part-of: odoo/odoo#94952
This commit is contained in:
Bruno Boi
2022-07-05 17:32:50 +02:00
parent efcf488d23
commit 683c29c43f
3 changed files with 8 additions and 8 deletions
@@ -29,7 +29,7 @@
box-shadow: $box-shadow;
margin: 0 $o-kanban-record-margin ($o-kanban-record-margin * 2);
.o_form_view {
.o_wowl_form_view {
padding: 0;
.o_group.o_inner_group {
margin: 0;
@@ -7,7 +7,7 @@
t-att-class="{ o_disabled: state.disabled }"
t-ref="root"
>
<FormRenderer class="'o_form_view o_xxs_form_view'" record="props.record" archInfo="props.archInfo" />
<FormRenderer class="'o_wowl_form_view o_xxs_form_view'" record="props.record" archInfo="props.archInfo" />
<div class="d-flex">
<button class="btn btn-primary o_kanban_add mr-1 text_truncate" t-on-click="() => this.validate('add')">
Add
@@ -1166,7 +1166,7 @@ QUnit.module("Views", (hooks) => {
".o_kanban_group:first-child .o_kanban_quick_create"
);
assert.containsOnce(quickCreate, ".o_form_view.o_xxs_form_view");
assert.containsOnce(quickCreate, ".o_wowl_form_view.o_xxs_form_view");
assert.containsOnce(quickCreate, "input");
assert.containsOnce(
quickCreate,
@@ -1239,7 +1239,7 @@ QUnit.module("Views", (hooks) => {
".o_kanban_group:first-child .o_kanban_quick_create"
);
assert.containsOnce(quickCreate, ".o_form_view.o_xxs_form_view");
assert.containsOnce(quickCreate, ".o_wowl_form_view.o_xxs_form_view");
assert.containsOnce(
target,
".o_control_panel",
@@ -1656,13 +1656,13 @@ QUnit.module("Views", (hooks) => {
await quickCreateRecord();
assert.hasClass(
target.querySelector(".o_kanban_quick_create .o_form_view"),
target.querySelector(".o_kanban_quick_create .o_wowl_form_view"),
"o_xxs_form_view"
);
await triggerEvent(window, "", "resize");
assert.hasClass(
target.querySelector(".o_kanban_quick_create .o_form_view"),
target.querySelector(".o_kanban_quick_create .o_wowl_form_view"),
"o_xxs_form_view"
);
});
@@ -3339,7 +3339,7 @@ QUnit.module("Views", (hooks) => {
blockGetViews = true;
await quickCreateRecord();
assert.containsNone(target, ".o_form_view");
assert.containsNone(target, ".o_wowl_form_view");
// click to fold the first column
const clickColumnAction = await toggleColumnActions(0);
@@ -3350,7 +3350,7 @@ QUnit.module("Views", (hooks) => {
prom.resolve();
await nextTick();
assert.containsNone(target, ".o_form_view");
assert.containsNone(target, ".o_wowl_form_view");
assert.containsOnce(target, ".o_column_folded");
});