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

Module: Partner Relations

Entity: res.partner

Compute Method: _compute_relation_count

Inputs Method Outputs
"""Count the number of relations this partner has for Smart Button

        Don't count inactive relations.
        """
for rec in self:
            rec.relation_count = len(rec.relation_all_ids.filtered("active"))

Back to entity