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

Module: Discuss

Entity: discuss.call.history

Compute Method: _compute_recording_media

Inputs Method Outputs
for call_history in self:
            mimetypes = call_history.artifact_ids.filtered(
                lambda artifact: artifact._is_recording_media(),
            ).media_id.mapped("mimetype")
            call_history.has_audio = any(
                mimetype.startswith("audio/") for mimetype in mimetypes
            )
            call_history.has_video = any(
                mimetype.startswith("video/") for mimetype in mimetypes
            )
            call_history.has_recording = call_history.has_audio or call_history.has_video

Back to entity