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,2 @@
from . import ir_attachment
from . import fs_image_mixin

View file

@ -0,0 +1,17 @@
# 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 FSImageMixin(models.AbstractModel):
_name = "fs.image.mixin"
_description = "Image Mixin"
image = FSImage("Image")
# resized fields stored (as attachment) for performance
image_medium = FSImage(
"Image medium", related="image", max_width=128, max_height=128, store=True
)

View file

@ -0,0 +1,15 @@
# Copyright 2023 ACSONE SA/NV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class IrAttachment(models.Model):
_inherit = "ir.attachment"
alt_text = fields.Char(
"Alternative Text",
help="Alternative text for the image. Only used for images on a website.",
translate=False,
)