fusion_claims: fix handoff_to_client Selection ordering (v19.0.8.0.4)

In v19.0.8.0.3 the new handoff_to_client MOD state was inserted between
project_complete and pod_submitted in the Selection list, so it rendered
near the bottom of status dropdowns even though it happens very early in
the workflow. Also forgot to add it to _expand_mod_statuses, so it would
not appear as a kanban column without holding records.

Fixes:
- Move handoff_to_client in the Selection tuple to position 6 (right after
  quote_submitted, right before awaiting_funding) — parallel to
  quote_submitted as the alternative entry into awaiting_funding
- Add handoff_to_client to the main list in _expand_mod_statuses so it
  always appears as a kanban column
- Add handoff_to_client AND awaiting_funding to statusbar_visible on the
  sale_order form view (awaiting_funding was also missing before)

Deployed to odoo-westin (westin-v19) and odoo-mobility (mobility).
Re-ran -u fusion_claims on both so Odoo resynced the Selection
sequence column. Verified: both databases now show sequence 0..15 with
handoff_to_client at sequence 5, identical between servers.
This commit is contained in:
gsinghpal
2026-04-09 08:02:39 -04:00
parent 0fe8a71c05
commit b6d101c9a2
3 changed files with 10 additions and 9 deletions

View File

@@ -426,13 +426,13 @@ class SaleOrder(models.Model):
('assessment_completed', 'Assessment Done'),
('processing_drawings', 'Processing Drawing'),
('quote_submitted', 'Quote Sent'),
('handoff_to_client', 'Handed Off (Client/Authorizer Submitting)'),
('awaiting_funding', 'Awaiting Funding'),
('funding_approved', 'Approved'),
('funding_denied', 'Denied'),
('contract_received', 'PCA Received'),
('in_production', 'In Production'),
('project_complete', 'Complete'),
('handoff_to_client', 'Handed Off (Client/Authorizer Submitting)'),
('pod_submitted', 'POD Sent'),
('case_closed', 'Closed'),
('on_hold', 'On Hold'),
@@ -442,9 +442,10 @@ class SaleOrder(models.Model):
default='need_to_schedule',
tracking=True,
group_expand='_expand_mod_statuses',
help='March of Dimes case workflow status. handoff_to_client means we '
'have given the proposal+quote+drawing to the client or authorizer '
'and are waiting for them to submit the application to MOD.',
help='March of Dimes case workflow status. handoff_to_client sits '
'parallel to quote_submitted: both lead to awaiting_funding but '
'handoff_to_client means we have given the proposal+quote+drawing '
'to the client or authorizer and are waiting for them to submit.',
)
@api.model
@@ -454,9 +455,9 @@ class SaleOrder(models.Model):
cancelled) only appear when records exist in them."""
main = [
'need_to_schedule', 'assessment_scheduled', 'assessment_completed',
'processing_drawings', 'quote_submitted', 'awaiting_funding',
'funding_approved', 'contract_received', 'in_production',
'project_complete', 'pod_submitted', 'case_closed',
'processing_drawings', 'quote_submitted', 'handoff_to_client',
'awaiting_funding', 'funding_approved', 'contract_received',
'in_production', 'project_complete', 'pod_submitted', 'case_closed',
]
result = list(main)
for s in (states or []):