Skip to content

Commit

Permalink
[FIX] bug zip product image
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieudelva committed Aug 13, 2024
1 parent ec9684e commit b05efd5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion zip_product_image/models/product.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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')

0 comments on commit b05efd5

Please sign in to comment.