73b3032069
- Updates AGENTS.md to clarify that production must keep invoice data on the same host as the model runtime, while shared LAN endpoints are acceptable for integration testing and staging. - Bumps pyproject.toml version to 0.1.0-dev and adds development status classifiers. - Adds CHANGELOG.md with Unreleased and 0.1.0 entries.
43 lines
2.3 KiB
Markdown
43 lines
2.3 KiB
Markdown
# Changelog
|
||
|
||
All notable changes to `odoo-ocr` are documented in this file.
|
||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||
|
||
## [Unreleased]
|
||
|
||
### Added
|
||
|
||
- End-to-end CLI pipeline (`odoo-ocr process`) that orchestrates classifier → OCR branch → extraction → review → XML/sidecar.
|
||
- Document classifier with heuristic fallback to a small VLM (`Qwen2.5-VL-3B`).
|
||
- Four OCR/processing branches: `digital_pdf`, `scanned_print`, `handwritten`, and `mixed_unknown`.
|
||
- Unified `BaseVLMClient` interface supporting Ollama (primary) and future llama.cpp server integration.
|
||
- Per-model-call metrics logging (latency, tokens, prompt hash) and exponential-backoff retries for transient failures.
|
||
- File-based LLM response cache keyed by prompt, image hashes, model, temperature, response format, and max tokens.
|
||
- Structured extraction and review stages using Pydantic `ExtractedInvoice` and `ReviewResult` schemas.
|
||
- Vision review stage that compares the original invoice image(s) with the extracted JSON and can emit a corrected invoice.
|
||
- Odoo Enterprise vendor-bill XML generation with `res.partner`, `account.move`, `account.move.line`, and deterministic `account.tax` records.
|
||
- Confidence-based XML gating:
|
||
- `>= 0.90`: final XML.
|
||
- `0.75–0.89`: XML with a human-review advisory comment.
|
||
- `< 0.75`: sidecar JSON only; XML generation refused.
|
||
- Strict ISO 8601 date validation for `invoice_date` and `due_date`.
|
||
- Test coverage: 38 unit/integration tests across schemas, cache, classifier, branches, reviewer, XML builder, and CLI.
|
||
|
||
### Changed
|
||
|
||
- Bumped `tool.mypy.python_version` to `3.12` so third-party stubs parse cleanly, while `requires-python` stays at `>=3.11`.
|
||
|
||
### Project Rules
|
||
|
||
- Clarified the local-only / privacy constraint: production deployments must keep invoice data on the same host as the model runtime unless explicitly approved; shared LAN endpoints (e.g. a dedicated Ollama server on the local network) are acceptable for integration testing and staging.
|
||
|
||
## [0.1.0] - 2026-08-21
|
||
|
||
### Added
|
||
|
||
- Initial project scaffold: local invoice OCR pipeline with Ollama, classifier branches, structured extraction, review, and Odoo XML export.
|
||
|
||
[Unreleased]: https://github.com/ixsol/odoo_ocr/compare/v0.1.0...HEAD
|