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

Module: Overdue Invoice Reminder

Entity: overdue.reminder.action

Compute Method: _compute_invoice_count

Inputs Method Outputs
  • id
rg_res = self.env["account.invoice.overdue.reminder"].read_group(
            [("action_id", "in", self.ids), ("invoice_id", "!=", False)],
            ["action_id"],
            ["action_id"],
        )
mapped_data = {x["action_id"][0]: x["action_id_count"] for x in rg_res}
for rec in self:
            rec.reminder_count = mapped_data.get(rec.id, 0)

Back to entity