From af66512ea8ff5f740e68e8e3a63fccba11d36bb0 Mon Sep 17 00:00:00 2001 From: "Abdelouahab (abla)" Date: Tue, 16 Jan 2024 15:42:30 +0100 Subject: [PATCH] [FIX] web: open record from list with a x2m field on virtual record To reproduce ============ - On a project, on a task - create a subtask give it a name and from the list view click on the "view" button - you get redirected to form view to create a new task that is not related to the parent task or the project Problem ======= When you click on the "view" button, the task is not saved yet, so the subtask doesn't exist yet to be viewed in Form view Solution ======== We prevent the redirection to the form view if the record is not saved yet same logic as : https://github.com/odoo/odoo/commit/9b136383c2599301413e6770cc0ff204273b589d opw-3681471 closes odoo/odoo#149753 Signed-off-by: Aaron Bohy (aab) --- .../static/src/views/list/list_renderer.xml | 2 +- .../tests/views/form/form_view_tests.js | 28 +++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/addons/web/static/src/views/list/list_renderer.xml b/addons/web/static/src/views/list/list_renderer.xml index 922ff52006f..5571b3ae35d 100644 --- a/addons/web/static/src/views/list/list_renderer.xml +++ b/addons/web/static/src/views/list/list_renderer.xml @@ -272,7 +272,7 @@