The goal of this commit is to ensure that the form view dialog close button performs the same behaviour as the discard button. To enable this, we had to add the dialogData.dismiss, which lets you add a callBack that will only be executed when a dialog is closed because of the "x" or the "escape" shortcut. closes odoo/odoo#135116 Related: odoo/enterprise#47283 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>