Ensure that objects in the Pool has __slots__

issue10719
review375361002
This commit is contained in:
Cédric Krier
2021-09-23 23:12:35 +02:00
parent 1afe88242a
commit a94a99e99b
+2
View File
@@ -27,6 +27,7 @@ URL_EXTERNAL_BASE = config.get('product', 'image_base', default=http_host())
class ImageURLMixin:
__slots__ = ()
__image_url__ = None
images = None
image_url = fields.Function(fields.Char("Image URL"), '_get_image_url')
@@ -97,6 +98,7 @@ class Product(ImageURLMixin, metaclass=PoolMeta):
class ImageMixin:
__slots__ = ()
image = fields.Binary(
"Image", file_id=file_id, store_prefix=store_prefix, required=True)
image_id = fields.Char("Image ID", readonly=True)