From 43908c5fcdf29b79cbaf1eaa69479b37a41bb015 Mon Sep 17 00:00:00 2001 From: FrancoisGe Date: Wed, 28 Sep 2022 14:11:25 +0000 Subject: [PATCH] [FIX] web_editor: translatable html fields Before this commit, clicking on the translate button of a web_editor html field throw an error. closes odoo/odoo#101551 X-original-commit: c5199c8e21abd90e2904e31240e427fa2e920803 Signed-off-by: David Monjoie (dmo) --- addons/web/static/src/views/fields/translation_button.js | 5 +++++ addons/web_editor/static/src/js/backend/html_field.xml | 5 +---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/addons/web/static/src/views/fields/translation_button.js b/addons/web/static/src/views/fields/translation_button.js index a92a79ce66e..365e0b72b08 100644 --- a/addons/web/static/src/views/fields/translation_button.js +++ b/addons/web/static/src/views/fields/translation_button.js @@ -78,3 +78,8 @@ export class TranslationButton extends Component { } } TranslationButton.template = "web.TranslationButton"; +TranslationButton.props = { + fieldName: { type: String }, + record: { type: Object }, + updateField: { type: Function }, +}; diff --git a/addons/web_editor/static/src/js/backend/html_field.xml b/addons/web_editor/static/src/js/backend/html_field.xml index 82872c8098c..9c16e9c42af 100644 --- a/addons/web_editor/static/src/js/backend/html_field.xml +++ b/addons/web_editor/static/src/js/backend/html_field.xml @@ -29,11 +29,8 @@