bemade-addons/account_credit_hold/models/account_followup_report.py
Marc Durepos 5adce1fd15 [MIG] 17.0..18.0 account_credit_hold
Migrated module account_credit_hold from 17.0 to 18.0. Fixed views and
models and wrote test cases to check functionality.
2025-09-04 12:33:00 -04:00

16 lines
571 B
Python

from odoo import models, fields, api, _
class FollowUpReport(models.AbstractModel):
_inherit = 'account.followup.report'
def _get_followup_report_options(self, partner, options=None):
"""
Override to include credit hold information in followup report options.
"""
res = super()._get_followup_report_options(partner, options)
res.update({
'credit_hold': partner.followup_line_id.account_hold if partner.followup_line_id else False,
'partner_on_hold': partner.on_hold
})
return res