From 60a3e7f9261bbf0b26cf815133bafd7628bc4133 Mon Sep 17 00:00:00 2001 From: Romain Derie Date: Wed, 27 Dec 2023 17:25:45 +0100 Subject: [PATCH] [FIX] website: correct owl DuplicatePageDialog props `onDuplicate` was marked as optional while it never was. If you don't specify it, the call to `this.props.onDuplicate();` will still be executed and will crash: `Uncaught Promise > this.props.onDuplicate is not a function` Randomly spotted while reviewing PR about duplicate button in list view related to opw-3640878. But it's not related to it. closes odoo/odoo#147647 X-original-commit: 296feaa9aa16cdb1766ce8d2f5ae8126d74f881b Signed-off-by: Quentin Smetz (qsm) Signed-off-by: Romain Derie (rde) --- addons/website/static/src/components/dialog/page_properties.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website/static/src/components/dialog/page_properties.js b/addons/website/static/src/components/dialog/page_properties.js index 273ebb7bdf0..57258ca2541 100644 --- a/addons/website/static/src/components/dialog/page_properties.js +++ b/addons/website/static/src/components/dialog/page_properties.js @@ -139,7 +139,7 @@ DuplicatePageDialog.template = xml` `; DuplicatePageDialog.props = { - onDuplicate: {type: Function, optional: true}, + onDuplicate: Function, close: Function, pageId: Number, };