Initial commit: OCA Server Auth packages (29 packages)

This commit is contained in:
Ernad Husremovic 2025-08-29 15:43:06 +02:00
commit 3ed80311c4
1325 changed files with 127292 additions and 0 deletions

View file

@ -0,0 +1,25 @@
# © 2021 Florian Kantelberg - initOS GmbH
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import logging
from odoo import _, api, fields, models
_logger = logging.getLogger(__name__)
class VaultFile(models.Model):
_name = "vault.file"
_description = _("File of a vault")
_order = "name"
_inherit = ["vault.abstract.field", "vault.abstract"]
value = fields.Binary(attachment=False)
@api.model
def search_read(self, *args, **kwargs):
if self.env.context.get("vault_reencrypt"):
return super(VaultFile, self.with_context(bin_size=False)).search_read(
*args, **kwargs
)
return super().search_read(*args, **kwargs)