From 835cb1d593cb263c79c9d7d2741ceb977494f07a Mon Sep 17 00:00:00 2001 From: Aaron Bohy Date: Wed, 24 Mar 2021 13:03:38 +0000 Subject: [PATCH] [FIX] web: empty fields don't increase row height MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit [1] tweaked the empty (unset) fields css rules s.t. they have a non null height in readonly, to reduce the shift between readonly and editable form view. This only concerns form view, but the changed rule also applied in list view. As a consequence, empty fields increased the rows height in list views. https://github.com/odoo/odoo/commit/288b24cbdf54ac0dbee7e012f074fac9a0c68238 closes odoo/odoo#68482 X-original-commit: 020b814b3be055c6bf795153dce6079810d34b1c Signed-off-by: Michaƫl Mattiello Signed-off-by: Aaron Bohy (aab) --- addons/web/static/src/scss/fields.scss | 4 ++-- addons/web/static/src/scss/form_view.scss | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/addons/web/static/src/scss/fields.scss b/addons/web/static/src/scss/fields.scss index 3551c52293c..2337fbe6e10 100644 --- a/addons/web/static/src/scss/fields.scss +++ b/addons/web/static/src/scss/fields.scss @@ -12,8 +12,8 @@ } // Empty -.o_field_empty:empty { - min-height: $font-size-base * $line-height-base; +.o_field_empty { + display: none; } // Numbers diff --git a/addons/web/static/src/scss/form_view.scss b/addons/web/static/src/scss/form_view.scss index c87a5d505a7..98e43fe8e8b 100644 --- a/addons/web/static/src/scss/form_view.scss +++ b/addons/web/static/src/scss/form_view.scss @@ -68,6 +68,10 @@ $o-form-label-margin-right: 0px; float: right!important; } + .o_field_empty:empty { + min-height: $font-size-base * $line-height-base; + } + .o_row { &, &.o_field_widget { // Some field may want to use o_row as root and these rules must prevalue display: flex;