Files
odoo-ai/agent_service
Carlos Garcia beac16a6a9 expenses_agent: fix OCR '$→8' misread inflating receipt totals
Add _fix_ocr_dollar_as_8() which strips a spurious leading '8' when it
sits at a word boundary before a non-zero digit + 1–3 more digits + .dd
(covers $10–$9999).  Applied at the top of _extract_amount_from_text so
both the labeled-total pass and the max-scan pass benefit.

  845.00  → 45.00   ($45 misread as 845)
  885.00  → 85.00   ($85 misread as 885)
  8150.00 → 150.00  ($150 misread as 8150)
  85.00   → 85.00   UNCHANGED (real $85 correctly read)
  8.50    → 8.50    UNCHANGED (real $8.50 correctly read)

12 new tests covering fix cases, non-fix cases, and end-to-end extraction
(110 tests total, all passing).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 16:08:39 -04:00
..