From 9927ee6d4ed7de0f7a3bdd4e46cc8058a2e909ee Mon Sep 17 00:00:00 2001 From: FrancoisGe Date: Mon, 24 Oct 2022 15:52:06 +0000 Subject: [PATCH] [FIX] web: click on a readonly field on editedRecord MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before this commit, in a list view, if you click on a readonly field of a record in edit mode, then it switches to readonly mode. Why ? The "pe-none" class added to readonly fields will prevent clicking on it. Our click will then be applied to the table causing a unselectRecord on the list. How to reproduce: - Going into an editable list view with a readonly field - Click on a field to switch the record to edit mode - Click on the readonly field Before this commit The record switches to read mode After this commit The record stays in edit mode closes odoo/odoo#104070 X-original-commit: 52c817b88b5c799322a19f49807126928d9f28e1 Signed-off-by: Bruno Boi (boi) Signed-off-by: Georis François (fge) --- addons/web/static/src/views/list/list_renderer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/static/src/views/list/list_renderer.js b/addons/web/static/src/views/list/list_renderer.js index 8fd47fe4737..03666f61f49 100644 --- a/addons/web/static/src/views/list/list_renderer.js +++ b/addons/web/static/src/views/list/list_renderer.js @@ -697,7 +697,7 @@ export class ListRenderer extends Component { this.props.list.editedRecord && this.props.list.editedRecord.isReadonly(column.name) ) { - classNames.push("pe-none", "text-muted"); + classNames.push("text-muted"); } else { classNames.push("cursor-pointer"); }