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

Module: Connector Search Engine

Entity: se.backend

Compute Method: _compute_binding_count

View 18.0
Inputs Method Outputs
  • id
+ res = self.env["se.binding"]._read_group(
+             [("backend_id", "in", self.ids)],
+             ["backend_id"],
+             ["__count"],
+         )
+ mapped_data = {backend_id: count for backend_id, count in res}
+ for record in self:
+             record.binding_count = mapped_data.get(record.id, 0)
  • binding_count

Back to entity