Skip to content

[19.0][ADD] ai_sale_product_matcher: find best-matched PIM products from requirement docs/images using AI - #106

Open
volkantasci wants to merge 14 commits into
OCA:19.0from
volkantasci:19.0-add-ai-sale-product-matcher
Open

[19.0][ADD] ai_sale_product_matcher: find best-matched PIM products from requirement docs/images using AI#106
volkantasci wants to merge 14 commits into
OCA:19.0from
volkantasci:19.0-add-ai-sale-product-matcher

Conversation

@volkantasci

Copy link
Copy Markdown

Adds ai_sale_product_matcher — find best-matched PIM products from requirement docs/images using a vision LLM.

What it does

Upload a spec sheet, email screenshot or type requirements (e.g. "120 bar soğuk sulu, monofaze, 2.3kW, deterjan tanklı") — the module extracts a canonical requirements JSON using the same ai_connection openai_compatible vision pipeline as ai_document_extraction (only prompts differ), then scores all product.template records against the PIM attribute catalog (katalog-sablonu.json → 232 keys) with type-aware matching (range, tolerance, fuzzy, directional en az/en fazla) and weighted groups. Top 10 matches are shown on the Sale Order with match % and can be added as order lines.

Sales integration: sale.orderFind Products with AI wizard (file + text → Extract → editable JSON → Find Matches → Add to Order). Extraction runs via queue_job + bus so UI never blocks.

Key features:

  • Vision LLM extraction (PDF/image with pdf2image/Pillow preprocessing, multi-page support, live PIM key set in prompt, English prompts sector-independent)
  • Type-aware product matching (exact/range/tolerance + missing-neutral scoring, Brand/Category optional filter)
  • Ranked results (matched count first, then weighted % — ideal product is top)
  • Async via queue_job + bus (non-blocking wizard)
  • Full queue_job/bus/ai_connection deps, ACL, i18n (TR), tests

Technical notes

  • Depends on sale, product, bus, queue_job, ai_connection, ai_tool (same stack as ai_document_extraction).
  • Uses ai_connection OpenAI-compatible client; prompts filtered to non-null keys to avoid truncation/401.
  • Tests mock LLM at service boundary (test_product_matcher, test_requirement_extractor).
  • Follows OCA 19.0 scaffolding (readme fragments, ir.model.access.csv, AGPL-3).

cc @OCA/ai-maintainers

…racted text (fix empty extraction for spec sheets)
@oca-cla-bot

oca-cla-bot Bot commented Aug 22, 2026

Copy link
Copy Markdown

The following commit authors need to sign the Contributor License Agreement:

CLA not signed

@OCA-git-bot OCA-git-bot added series:19.0 mod:ai_sale_product_matcher Module ai_sale_product_matcher labels Aug 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:ai_sale_product_matcher Module ai_sale_product_matcher series:19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants