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

Module: Account Payment Order Notification

Entity: account.payment.order

Compute Method: _compute_notification_count

Inputs Method Outputs
  • id
notification_data = self.env["account.payment.order.notification"].read_group(
            [("order_id", "in", self.ids)], ["order_id"], ["order_id"]
        )
mapped_data = {r["order_id"][0]: r["order_id_count"] for r in notification_data}
for record in self:
            record.notification_count = mapped_data.get(record.id, 0)

Back to entity