From d5e40ea78b1079dc315687a987f16cfb3cd2f825 Mon Sep 17 00:00:00 2001 From: "Laurent Stukkens (LTU)" Date: Mon, 17 Jan 2022 14:54:59 +0000 Subject: [PATCH] [FIX] project: prevent issue on description field resize in form Prior to this commit: - The selector used by the FormHtmlFieldExpanderMixin is the generic one '.o_xxl_form_view .oe_form_field.oe_form_field_html'. This selector, altough valid, could lead to an undesired behavior if another html field is present previously (before the description one) in the view. After this commit: - The '[name="description"] is added to the selector which reduces the possible matches only to the one of the description field. closes odoo/odoo#82926 X-original-commit: db8684055712ec9c5d1acadee60e54a78d87c941 Signed-off-by: Laurent Stukkens (ltu) --- addons/project/static/src/js/project_form.js | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/project/static/src/js/project_form.js b/addons/project/static/src/js/project_form.js index 32c9b8d47b3..3db4c6a36a4 100644 --- a/addons/project/static/src/js/project_form.js +++ b/addons/project/static/src/js/project_form.js @@ -99,6 +99,7 @@ const FormDescriptionExpanderRenderer = FormRenderer.extend(Object.assign({}, Fo // 58px is the sum of the top margin of o_form_sheet 12 px + the bottom padding of o_form_sheet 24px // + 5px margin bottom (o_field_widget) + 1px border + the bottom padding of tab-pane 16 px. bottomDistance: 58, + fieldQuerySelector: '.o_xxl_form_view .oe_form_field.oe_form_field_html[name="description"]', })); export const FormDescriptionExpanderView = FormView.extend({