[FIX] web: close button in form view dialog discard

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>
This commit is contained in:
FrancoisGe
2023-09-13 15:34:40 +00:00
parent 9aa16f4072
commit 2ee329f6ca
9 changed files with 70 additions and 24 deletions
@@ -17,7 +17,6 @@
</xpath>
<xpath expr="//t[@t-slot='header']" position="replace">
<t t-call="web.ActionDialog.header">
<t t-set="close" t-value="() => this.data.close()"/>
<t t-set="fullscreen" t-value="props.isFullscreen"/>
</t>
</xpath>