From 2156805f277dc2a97c6bb1b3c5e30d8bed455d43 Mon Sep 17 00:00:00 2001 From: Mathieu Duckerts-Antoine Date: Wed, 31 Aug 2022 13:07:46 +0000 Subject: [PATCH] [FIX] web: kanban: quick create in legacy dialog When one tries to quick create a record in a kanban view column and a rpc error occurs, a form view dialogs open. If the form view to display in the dialog is a legacy view, save the record displayed in the dialog make the kanban renderer receive a legacy datapoint with no resId key, making impossible to add the appropriate record to the column. We fix that. closes odoo/odoo#99294 Signed-off-by: Aaron Bohy (aab) --- addons/web/static/src/views/view_dialogs/form_view_dialog.js | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/web/static/src/views/view_dialogs/form_view_dialog.js b/addons/web/static/src/views/view_dialogs/form_view_dialog.js index ec9e8c46fa1..2ea43450999 100644 --- a/addons/web/static/src/views/view_dialogs/form_view_dialog.js +++ b/addons/web/static/src/views/view_dialogs/form_view_dialog.js @@ -84,6 +84,7 @@ export class FormViewDialog extends Component { title: this.props.title, disable_multiple_selection: true, on_saved: async (record) => { + record.resId = record.res_id || false; await this.props.onRecordSaved(record); this.props.close(); },