gsinghpal 125f48377a feat(fusion_accounting_ocr): pluggable OCR for vendor bills
Replaces Enterprise's account_invoice_extract with a Fusion-native pipeline:

Stage 1 (text extraction): Tesseract OCRs the bill attachment via
pytesseract + pdf2image. Pluggable OCRProvider adapter pattern allows
future Mindee / Google Document AI / Ollama-vision backends.

Stage 2 (field parsing): The fusion_accounting_ai LLMProvider reads the
raw OCR text and returns structured invoice fields (vendor, invoice
number, dates, amounts, line items) as JSON.

Draft invoice fields are auto-populated for empty-only fields (never
overwriting user-entered data). Vendor matching by name against
res.partner with supplier_rank > 0.

Adds:
- account.move.ocr_state (selection: not_requested/pending/processing/
  done/failed/manual)
- account.move.ocr_raw_text, ocr_extracted_data (Json), ocr_backend,
  ocr_confidence
- fusion.ocr.log (audit trail per OCR run)
- res.company.fusion_ocr_enabled / fusion_ocr_default_backend / auto_run
- /fusion/ocr/request_for_invoice JSON-RPC endpoint

Backend availability detected at runtime via OCRProvider.is_available()
classmethods. Tesseract 5.3.4 + pytesseract 0.3.13 + pdf2image 1.17.0
are installed in the container.

Tests: 13 (TesseractAdapter availability + image OCR; flow tests for
draft autofill, no-attachment guard, customer-invoice guard, ref-not-
overwritten; field parser empty/clean-json/markdown-fence/bad-JSON/
provider-exception). All pass on westin-v19 OrbStack VM.

Made-with: Cursor
2026-04-20 00:32:50 -04:00
2026-02-22 01:37:50 -05:00
2026-02-22 01:37:50 -05:00
2026-02-22 01:37:50 -05:00
2026-04-12 09:09:50 -04:00
2026-04-13 02:35:35 -04:00
2026-03-09 15:21:22 -04:00
2026-03-16 08:14:56 -04:00
2026-04-12 09:09:50 -04:00
2026-03-16 08:14:56 -04:00
2026-04-17 17:31:12 -04:00
2026-03-17 13:32:08 -04:00
2026-03-16 08:14:56 -04:00
2026-03-20 11:46:41 -04:00
2026-03-13 12:38:28 -04:00
2026-03-13 12:38:28 -04:00
2026-03-14 12:04:20 -04:00
2026-03-11 12:15:53 -04:00
2026-03-16 08:14:56 -04:00
2026-04-12 09:09:50 -04:00
2026-03-16 08:14:56 -04:00
2026-04-07 22:03:20 -04:00
2026-03-13 12:38:28 -04:00
2026-04-04 15:37:16 -04:00
2026-03-26 15:16:51 -04:00
2026-03-09 15:21:22 -04:00
2026-03-17 13:32:08 -04:00
2026-04-12 09:09:50 -04:00
2026-03-13 12:38:28 -04:00
2026-04-17 17:31:12 -04:00
2026-03-09 15:21:22 -04:00
2026-02-22 01:22:18 -05:00
2026-04-07 21:47:15 -04:00
2026-02-22 01:37:50 -05:00
2026-03-13 12:38:28 -04:00
2026-03-13 12:38:28 -04:00
2026-04-17 17:31:12 -04:00
2026-02-22 01:22:18 -05:00
2026-04-12 09:11:35 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-12 09:11:35 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-12 09:11:35 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
Description
Odoo 19 custom modules
211 MiB
Languages
Python 55.9%
HTML 26.1%
JavaScript 14.9%
SCSS 1.8%
CSS 0.8%
Other 0.4%