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

Module: Spreadsheet Dashboard Oca

Entity: spreadsheet.dashboard

Compute Method: _compute_can_edit

Inputs Method Outputs
  • id
"""We can edit if the record doesn't have XML-ID, or the XML-ID is noupdate=1"""
self.can_edit = True
for record in self.filtered("id"):
            imd = self.env["ir.model.data"].search(
                [("model", "=", record._name), ("res_id", "=", record.id)]
            )
            if imd and imd.module != "__export__":
                record.can_edit = imd.noupdate

Back to entity