changes
This commit is contained in:
@@ -153,11 +153,15 @@ class FusionAccountingDashboard(models.TransientModel):
|
||||
if balance > 0.01:
|
||||
issues += 1
|
||||
|
||||
gaps = self.env['account.move'].search_count([
|
||||
('state', '=', 'posted'),
|
||||
('company_id', '=', rec.company_id.id),
|
||||
('made_sequence_gap', '=', True),
|
||||
])
|
||||
# M4: Guard against made_sequence_gap field not existing
|
||||
try:
|
||||
gaps = self.env['account.move'].search_count([
|
||||
('state', '=', 'posted'),
|
||||
('company_id', '=', rec.company_id.id),
|
||||
('made_sequence_gap', '=', True),
|
||||
])
|
||||
except (ValueError, KeyError):
|
||||
gaps = 0
|
||||
issues += gaps
|
||||
|
||||
pending_approvals = self.env['fusion.accounting.match.history'].search_count([
|
||||
@@ -267,7 +271,7 @@ class FusionAccountingDashboard(models.TransientModel):
|
||||
rec.recent_activity_json = json.dumps([{
|
||||
'tool': r.tool_name,
|
||||
'decision': r.decision,
|
||||
'date': str(r.proposed_at),
|
||||
'date': r.proposed_at.isoformat() if r.proposed_at else '',
|
||||
'amount': r.amount,
|
||||
} for r in recent])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user