[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
Open
Conversation
…quirement docs/images using AI
…on invalid in Odoo 19)
…ent truncation/401)
…troller.model.load)
…racted text (fix empty extraction for spec sheets)
… fazla) and missing-neutral scoring
…mpts, live PIM key set
…duct must be top)
…pping (sector-independent but stable)
…Turkish translations
…ete Turkish translations
…(manual Find Matches only)
|
The following commit authors need to sign the Contributor License Agreement: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_connectionopenai_compatiblevision pipeline asai_document_extraction(only prompts differ), then scores allproduct.templaterecords against the PIM attribute catalog (katalog-sablonu.json→ 232 keys) with type-aware matching (range, tolerance, fuzzy, directionalen 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.order→ Find Products with AI wizard (file + text → Extract → editable JSON → Find Matches → Add to Order). Extraction runs viaqueue_job+busso UI never blocks.Key features:
pdf2image/Pillowpreprocessing, multi-page support, live PIM key set in prompt, English prompts sector-independent)queue_job+bus(non-blocking wizard)queue_job/bus/ai_connectiondeps, ACL, i18n (TR), testsTechnical notes
sale,product,bus,queue_job,ai_connection,ai_tool(same stack asai_document_extraction).ai_connectionOpenAI-compatible client; prompts filtered to non-null keys to avoid truncation/401.test_product_matcher,test_requirement_extractor).ir.model.access.csv,AGPL-3).cc @OCA/ai-maintainers