Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.
Module: Partner Auth
Entity: res.partner
Compute Method: _compute_auth_partner_count
| Inputs | Method | Outputs |
|---|---|---|
|
- data = self.env["auth.partner"]._read_group( - [ - ("partner_id", "in", self.ids), - ], - ["partner_id"], - aggregates=["__count"], - ) - mapped_data = {auth_partner.id: count for auth_partner, count in data} - for record in self: - record.auth_partner_count = mapped_data.get(record.id, 0) |
|
