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

Module: Manage model export profiles

Entity: ir.exports.line

Compute Method: _compute_model2_id

Inputs Method Outputs
"""Get the related model for the second field."""
IrModel = self.env["ir.model"].sudo()
for one in self:
            one.model2_id = (
                one.field1_id.ttype
                and "2" in one.field1_id.ttype
                and IrModel.search([("model", "=", one.field1_id.relation)])
            )

Back to entity