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:
@@ -76,7 +76,8 @@ class FusionPartnerFollowup(models.Model):
|
||||
"""Return unpaid receivable move lines that are past due.
|
||||
|
||||
Searches for posted, unreconciled journal items on receivable
|
||||
accounts where the maturity date is earlier than today.
|
||||
accounts where the maturity date is earlier than today and
|
||||
there is still an outstanding balance.
|
||||
|
||||
:returns: An ``account.move.line`` recordset.
|
||||
"""
|
||||
@@ -88,6 +89,7 @@ class FusionPartnerFollowup(models.Model):
|
||||
('account_id.account_type', '=', 'asset_receivable'),
|
||||
('parent_state', '=', 'posted'),
|
||||
('reconciled', '=', False),
|
||||
('amount_residual', '>', 0),
|
||||
('date_maturity', '<', today),
|
||||
])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user