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: account.move

Compute Method: _compute_overdue_reminder

Inputs Method Outputs
  • action_date
  • counter
for move in self:
            all_dates = []
            all_counters = []
            # faster than 2 list comprehension because we loop only once?
            for reminder in move.overdue_reminder_ids.filtered(lambda m: m.action_date):
                all_dates.append(reminder.action_date)
                all_counters.append(reminder.counter or 0)
            move.overdue_reminder_last_date = all_dates and max(all_dates) or False
            move.overdue_reminder_counter = all_counters and max(all_counters) or 0

Back to entity