Since https://github.com/odoo/odoo/commit/28e6b7eb83e4309c4e70974d947194bdca240865, the boolean toggle widget trigger a save when the user clicks on it. This is a problem when the widget is used in a form view opened from a o2m list, because the record updated is saved immediately, even if the user clicks on the discard button. This commit adds a new option to disable the autosave on the boolean toggle widget. To disable the autosave, add `autosave: false` in the options on the field definition. Task-id 3235962 closes odoo/odoo#120000 X-original-commit: b56e58dff3258698dbbf173bc6790a35a47131b0 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>