From 5bdeb04df221973093a393ee7c90862010cfff15 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Wed, 12 Feb 2025 12:48:44 +0100 Subject: [PATCH] [FIX] runbot_merge: disable autosave on boolean toggles That's a bit of a weird one: apparently the boolean_toggle widget has an `autosave` option which should be `true` by default, effecting the row as soon as the toggle is toggled[^1]. But in 15.0 and 18.0 it seems to have no effect, the `boolean_toggle` always just stores the change in the parent form and that gets "committed on save. In 16.0 and 17.0 however it does have an effect, toggling the control will immediately save its value *without going through the parent form*, resulting in the override to `Project.write` managing new/existing branches to not be called, thus not calling `Project_followup_prs`, and ultimately not creating the followup forward ports. After contacting AAB to get more info (and grepping a bit): - autosave was added (enabled by default) in 16.0 after the owl rewrite (odoo/odoo@28e6b7eb83e4309c4e70974d947194bdca240865) - toggle was added in 17.0 (odoo/odoo@a449b05221d454afc7254be0fc8b84d7ff7ffc2f) - feature was removed in 18.0 (odoo/odoo@6bd2c1fdfb5722b1f2d4fc2684f20ed067b93b7d) Which explains why the issue occurs in 16.0 and 17.0, and not in 15.0 or 18.0. Fixes #1051 [^1]: but apparently not going through the parent form... --- runbot_merge/views/runbot_merge_project.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runbot_merge/views/runbot_merge_project.xml b/runbot_merge/views/runbot_merge_project.xml index a6edf629..59eaa910 100644 --- a/runbot_merge/views/runbot_merge_project.xml +++ b/runbot_merge/views/runbot_merge_project.xml @@ -70,8 +70,8 @@