From 0426b57454045d47ee02514dc0a03a2d816687b8 Mon Sep 17 00:00:00 2001 From: Romain Derie Date: Mon, 4 Mar 2024 19:34:59 +0100 Subject: [PATCH] [FIX] website: restore default checked value for form radio buttons Same fix as for checkbox (commit [1]) and select (commit [2]). The radio buttons were forgotten. Check commit [1] for in-depth explanation, but this is basically because since the qweb engine conversion to OWL (done at [3]), it would toggle the internal `checked` value and not the `checked` attribute anymore. [1]: https://github.com/odoo/odoo/commit/b42e9cc686e7d3ccf82cd091a5dc24028fff8a2b [2]: https://github.com/odoo/odoo/commit/dd504811303a2ace661259d05d1e3b88794dc5be [3]: https://github.com/odoo/odoo/pull/130467 opw-3755078 closes odoo/odoo#156818 X-original-commit: d683947e2710e8443f44b1eca98e324d82f33c3a Signed-off-by: Robin Lejeune (role) --- addons/website/static/src/xml/website_form_editor.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/website/static/src/xml/website_form_editor.xml b/addons/website/static/src/xml/website_form_editor.xml index 16c124811944f..a7ad255dc95a5 100644 --- a/addons/website/static/src/xml/website_form_editor.xml +++ b/addons/website/static/src/xml/website_form_editor.xml @@ -228,7 +228,7 @@ value="Yes" class="s_website_form_input form-check-input" t-att-name="field.name" - t-att-checked="field.value and 'checked' or None" + t-att="{checked: field.value and 'checked' or None}" t-att-required="field.required || field.modelRequired || None" t-att-id="field.id" /> @@ -267,7 +267,7 @@ class="s_website_form_input form-check-input" t-att-id="recordId" t-att-name="field.name" - t-att-checked="record.selected and 'checked' or None" + t-att="{checked: record.selected and 'checked' or None}" t-att-value="record.id" t-att-required="field.required || field.modelRequired || None" />