Update statement_common.py

pull/1300/head
Phillip Venter 2025-03-24 12:25:36 +02:00 committed by GitHub
parent b3c6a72a8f
commit 1a8b9dc28e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@ class StatementCommon(models.AbstractModel):
date_end = fields.Date(required=True, default=fields.Date.context_today)
show_aging_buckets = fields.Boolean(default=True)
number_partner_ids = fields.Integer(
default=lambda self: len(self._context["active_ids"])
default=lambda self: self._context.get("active_ids") and len(self._context.get("active_ids"))
)
filter_partners_non_due = fields.Boolean(
string="Don't show partners with no due entries", default=True