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

Module: Sale Wishlist

Entity: res.partner

Compute Method: _compute_wishlists_count

View 18.0
Inputs Method Outputs
  • id
- data = self.env["product.set"].read_group(
-             self._wishlist_domain(), ["partner_id"], ["partner_id"]
-         )
- data_mapped = {
-             count["partner_id"][0]: count["partner_id_count"] for count in data
-         }
- for rec in self:
-             rec.wishlists_count = data_mapped.get(rec.id, 0)
  • wishlists_count

Back to entity