From a036f5ccf4a63b7e8c91ef5130671b68eaac9e03 Mon Sep 17 00:00:00 2001 From: Mohammed Shekha Date: Fri, 1 Jan 2021 09:38:30 +0000 Subject: [PATCH] [FIX] web: horizontal scrollbar in form without sheet before this commit: when form view have buttonbox or notebook tag and form does not have sheet tag then form will have horizontal scrollbar in screen, this is because we added scss mixin which always add negative margin of 32px because we added mixin by considering form will have sheet tag and because of that when form does not have sheet tag it shows useless horizontal scrollbar. after this commit: if formview does not have sheet tag and form contains button box or notebook tag then form will be displayed properly without unnecessary horizontal scrollbar. task-2411627 closes odoo/odoo#63961 Related: odoo/enterprise#15519 Signed-off-by: Aaron Bohy (aab) --- addons/web/static/src/scss/form_view.scss | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/addons/web/static/src/scss/form_view.scss b/addons/web/static/src/scss/form_view.scss index b4758d3e1bb..4f0810c0ad2 100644 --- a/addons/web/static/src/scss/form_view.scss +++ b/addons/web/static/src/scss/form_view.scss @@ -5,6 +5,9 @@ padding-left: $o-horizontal-padding*2; } } +@mixin o-form-nosheet-inner-left-padding { + padding-left: $o-horizontal-padding; +} @mixin o-form-sheet-inner-right-padding { padding-right: $o-horizontal-padding; @include media-breakpoint-between(lg, xl, $o-extra-grid-breakpoints) { @@ -21,6 +24,11 @@ } } +@mixin o-form-nosheet-negative-margin { + margin-left: -$o-horizontal-padding; + margin-right: -$o-horizontal-padding; +} + .o_form_view { background-color: $o-view-background-color; @@ -159,6 +167,9 @@ .o_form_statusbar { margin: (-$o-sheet-vpadding) (-$o-horizontal-padding) $o-sheet-vpadding (-$o-horizontal-padding); } + .oe_button_box { + @include o-form-nosheet-negative-margin; + } } // Non-chatter rules