Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: Base Attachment Object Store

Entity: ir.attachment

Compute Method: _compute_fs_url

Inputs Method Outputs
for rec in self:
            new_url = None
            actual_url = rec.fs_url or None
            if rec.fs_filename:
                new_url = self.env["fs.storage"]._get_url_for_attachment(rec)
            # ensure we compare value of same type and not None with False
            new_url = new_url or None
            if new_url != actual_url:
                rec.fs_url = new_url

Back to entity