feat: add fusion_odoo_fixes module for default Odoo patches
- New standalone module to collect fixes for default Odoo behavior - Fix #1: account_followup never clears followup_next_action_date when invoices are paid, causing collection emails to fully-paid clients. Hooks into _invoice_paid_hook to auto-clear stale data. - Harden Fusion Accounting followup queries with amount_residual > 0 filter and add balance check before sending emails Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -188,6 +188,15 @@ class FusionFollowupSendWizard(models.TransientModel):
|
||||
if not line:
|
||||
raise UserError(_("No follow-up record is linked to this wizard."))
|
||||
|
||||
line._compute_overdue_values()
|
||||
if line.overdue_amount <= 0:
|
||||
line.followup_status = 'no_action_needed'
|
||||
raise UserError(_(
|
||||
"Partner '%s' no longer has any overdue balance. "
|
||||
"Follow-up cancelled.",
|
||||
line.partner_id.display_name,
|
||||
))
|
||||
|
||||
partner = line.partner_id
|
||||
|
||||
# ---- Email ----
|
||||
|
||||
Reference in New Issue
Block a user