From bd732d32f1e6cdd3a7cacfd4dd80e179483ab94c Mon Sep 17 00:00:00 2001 From: Valentin Chevalier Date: Thu, 19 Aug 2021 07:39:32 +0000 Subject: [PATCH] [FIX] product_images: correctly throw an UserError The UserError was inadvertently removed and replaced by `google_pse_id_is_set` variable, which is a boolean. closes odoo/odoo#75298 Signed-off-by: Valentin Chevalier --- addons/product_images/wizard/product_fetch_image_wizard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/product_images/wizard/product_fetch_image_wizard.py b/addons/product_images/wizard/product_fetch_image_wizard.py index d0ebe0ad035..163d81839bc 100644 --- a/addons/product_images/wizard/product_fetch_image_wizard.py +++ b/addons/product_images/wizard/product_fetch_image_wizard.py @@ -47,7 +47,7 @@ class ProductFetchImageWizard(models.TransientModel): google_pse_id_is_set = bool(ICP.get_param('google.pse.id')) google_custom_search_key_is_set = bool(ICP.get_param('google.custom_search.key')) if not (google_pse_id_is_set and google_custom_search_key_is_set): - raise google_pse_id_is_set(_( + raise UserError(_( "The API Key and Search Engine ID must be set in the General Settings." ))