From 21f5d1c6783c4ab0289b64af41e5fff8f5c87975 Mon Sep 17 00:00:00 2001 From: divy-odoo Date: Thu, 4 May 2023 12:45:26 +0000 Subject: [PATCH] [FIX] website_blog: fix size options values when blog regular cover Before this commit, the widget value was updated (based on the current state) prior to updating the snippet UI. As a result, the widget value reflected used the non-updated UI labels. task-3112890 closes odoo/odoo#122810 X-original-commit: edc88a2ab99673427cbeac05246b8e586b121b72 Signed-off-by: Quentin Smetz (qsm) Signed-off-by: Divyesh Vyas (divy) --- addons/website_blog/static/src/js/options.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website_blog/static/src/js/options.js b/addons/website_blog/static/src/js/options.js index c44f296bcd4..4615c56549e 100644 --- a/addons/website_blog/static/src/js/options.js +++ b/addons/website_blog/static/src/js/options.js @@ -39,7 +39,6 @@ options.registry.CoverProperties.include({ * @override */ updateUI: async function () { - await this._super(...arguments); const isBlogCover = this.$target[0].classList.contains('o_wblog_post_page_cover'); if (!isBlogCover) { return; @@ -54,6 +53,7 @@ options.registry.CoverProperties.include({ $coverFull.children('div').text(isRegularCover ? _t("Large") : this._coverFullOriginalLabel); $coverMid.children('div').text(isRegularCover ? _t("Medium") : this._coverMidOriginalLabel); $coverAuto.children('div').text(isRegularCover ? _t("Tiny") : this._coverAutoOriginalLabel); + return this._super(...arguments); }, });