mirror of
https://github.com/bringout/oca-storage.git
synced 2026-04-21 09:32:05 +02:00
Initial commit: OCA Storage packages (17 packages)
This commit is contained in:
commit
7a380f05d3
659 changed files with 41828 additions and 0 deletions
|
|
@ -0,0 +1,2 @@
|
|||
from . import ir_attachment
|
||||
from . import fs_image_mixin
|
||||
|
|
@ -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
|
||||
)
|
||||
|
|
@ -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,
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue