From b05efd5fb6666a7fb7d88493032302b29857f540 Mon Sep 17 00:00:00 2001 From: Mathieu Date: Tue, 13 Aug 2024 14:39:37 +0200 Subject: [PATCH] [FIX] bug zip product image --- zip_product_image/models/product.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zip_product_image/models/product.py b/zip_product_image/models/product.py index 526e305b..84f5326c 100644 --- a/zip_product_image/models/product.py +++ b/zip_product_image/models/product.py @@ -1,6 +1,7 @@ # Copyright 2024 Akretion # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +import base64 from odoo import api, models LIMIT = 500 @@ -26,6 +27,6 @@ def _product_image_data(self): if "fs_product_multi_image" in self.env.registry._init_modules: # Here fs_product_multi_image is installed if self.image: - return (self.image.getvalue(), self.image.extension) + return (base64.b64encode(self.image.getvalue()), self.image.extension) return (False, False) return (self.image_1920 or False, '.jpg')