Initial commit: OCA Storage packages (17 packages)

This commit is contained in:
Ernad Husremovic 2025-08-29 15:43:06 +02:00
commit 7a380f05d3
659 changed files with 41828 additions and 0 deletions

View file

@ -0,0 +1,32 @@
# Copyright 2023 ACSONE SA/NV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import models
from ..fields import FSImage
class TestImageModel(models.Model):
_name = "test.image.model"
_description = "Test Model"
_log_access = False
fs_image = FSImage(verify_resolution=False)
fs_image_1024 = FSImage("Image 1024", max_width=1024, max_height=1024)
class TestRelatedImageModel(models.Model):
_name = "test.related.image.model"
_description = "Test Related Image Model"
_log_access = False
fs_image = FSImage(verify_resolution=False)
# resized fields stored (as attachment) for performance
fs_image_1024 = FSImage(
"Image 1024", related="fs_image", max_width=1024, max_height=1024, store=True
)
fs_image_512 = FSImage(
"Image 512", related="fs_image", max_width=512, max_height=512, store=True
)