From ba42f2dda93915879c7afbc10a877d71c71c63e2 Mon Sep 17 00:00:00 2001 From: Romain Derie Date: Fri, 10 Feb 2023 10:17:10 +0000 Subject: [PATCH] [FIX] website: show homepage in page list when multi website is disabled Since website was moved from frontend to backend in 16.0 with [1], there was an issue with the page list view which would not show the homepage record when multi website group was not enabled. Indeed, we have our own `recordFilter` method which is based on the `website_id` field. But the framework ignore this field (it doesn't read the property at all and so don't have access to its value) if it's hidden by a `groups` property. In such cases, the field should be duplicated and hidden with `invisible`, as those fields will have their value retrieved depsite being hidden. Step to reproduce: - Install website with no demo data (to have only one website) Or go to runbot / install website with demo data and disable the multi website group - Go to Website > Site > Pages - You don't see the homepage in the list, because there is 2 homepage (one specific and one generic) but since the website_id is not fetch, both are considered generic (which is not supposed to be possible) and the filter is then considering those to be shadowed by the other, ultimately filtering out both. [1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b closes odoo/odoo#112461 X-original-commit: 5ff5daee518d23c3b6958133eb1f99bc5fc1063f Signed-off-by: Romain Derie (rde) --- addons/website/views/website_pages_views.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/addons/website/views/website_pages_views.xml b/addons/website/views/website_pages_views.xml index 397d1997ce5..02d1eb6769e 100644 --- a/addons/website/views/website_pages_views.xml +++ b/addons/website/views/website_pages_views.xml @@ -79,7 +79,13 @@ + + +