Files
odoo-ai/tests
Carlos Garcia 77fab52475 fix(expenses): detect bank statements, fix default category, improve prompts
- Add _is_likely_bank_statement(): if OCR text has ≥10 lines with dollar
  amounts it is almost certainly a bank/card statement screenshot, not a
  single receipt.  Return skip=True so _act() skips it and adds a note to
  the escalations list instead of creating a $1,699 expense line.
- Fix default product selection in _act(): prefer "Meals" over whatever
  happens to be first in Odoo's expense product list ("Communication"),
  so unrecognised receipts get a sensible fallback category.
- Improve LLM category prompt: remove hardcoded product names (airline →
  Transport) that don't exist in every Odoo install; describe business
  types semantically so the model picks from the actual available list.
- Mention skipped statements in the final summary message.
- 77 tests, all passing.

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