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

Module: Helpdesk Management Activity

Entity: helpdesk.ticket

Compute Method: _compute_record_ref

Inputs Method Outputs
"""Compute Source Document Reference"""
for rec in self:
            if not rec.res_model or not rec.res_id:
                rec.record_ref = None
                continue
            try:
                record = self.env[rec.res_model].browse(rec.res_id)
                record.check_access("read")
                rec.record_ref = f"{rec.res_model},{rec.res_id}"
            except Exception:
                rec.record_ref = None

Back to entity