[18.0][ADD] web_widget_autocomplete: Char autocomplete widget - #3667
Open
ivs-cetmix wants to merge 3 commits into
Open
ivs-cetmix wants to merge 3 commits into
ivs-cetmix wants to merge 3 commits into
Conversation
ivs-cetmix
marked this pull request as draft
September 14, 2026 19:04
ivs-cetmix
force-pushed
the
18.0-add-web_widget_autocomplete
branch
5 times, most recently
from
September 14, 2026 21:16
ec5664b to
977906b
Compare
ivs-cetmix
force-pushed
the
18.0-add-web_widget_autocomplete
branch
from
September 14, 2026 21:51
9089de6 to
f5e428d
Compare
ivs-cetmix
marked this pull request as ready for review
September 14, 2026 22:00
ivs-cetmix
force-pushed
the
18.0-add-web_widget_autocomplete
branch
3 times, most recently
from
September 15, 2026 19:31
81ee7f7 to
c9e5c8c
Compare
ivs-cetmix
force-pushed
the
18.0-add-web_widget_autocomplete
branch
from
September 15, 2026 19:53
c9e5c8c to
b68e45b
Compare
ivs-cetmix
force-pushed
the
18.0-add-web_widget_autocomplete
branch
from
September 15, 2026 20:11
06d16a9 to
b255fcb
Compare
ivs-cetmix
force-pushed
the
18.0-add-web_widget_autocomplete
branch
from
September 16, 2026 07:44
fcf5214 to
f0fba17
Compare
Odoo 18 has no backend Char widget that typeahead-fills from a consumer-supplied model method. This addon reuses web.AutoComplete so integrators can hook any public @api.model method. HOOT is selected with WebSuite hash ids so sibling WebWidget* suites do not pick these tests up via fuzzy matching. Task 5613 Co-authored-by: Cursor <cursoragent@cursor.com>
Keep the widget addon generic. This demo wires partner City to an in-memory list of Italian and world cities so selecting a suggestion also fills ZIP on the contact form. Task 5613 Co-authored-by: Cursor <cursoragent@cursor.com>
ivs-cetmix
force-pushed
the
18.0-add-web_widget_autocomplete
branch
from
September 16, 2026 09:15
f0fba17 to
2fd32eb
Compare
Member
Author
|
Hey @OCA/web-maintainers don't get me wrong - not asking for a fast track here, but would appreciate someone having a look at this. It's already being in use, however I cannot review my code myself 😄 |
Member
Member
|
@ivs-cetmix much less pushiness please. I planned to review this on Friday, but will bump it down the list in order not to reward such behavior |
Member
Author
|
@yostashiro thank you, will check! |
Enter is handled by both AutoComplete and useInputField. Core only stopPropagations, so the Char hook can still commit the typed string and overwrite the highlighted row. Stop the hook and sync the input to the selected label before onSelect. Task 5613 Co-authored-by: Cursor <cursoragent@cursor.com>
Member
Author
|
@yostashiro this was fixed, could you please check it again? |
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.

Depends on:
Odoo 18 has no backend Char widget that typeahead-fills from a consumer-supplied model method. Partner autocomplete is IAP-only, and
web_widget_dropdown_dynamicis a closed select, not typeahead.This addon registers
widget="autocomplete"on Char fields, calls a public@api.modelmethod with the typed string, and on select writes the Char plus any extra Char/Integer keys that exist on the model and in the view.Task 5613
Made with AI assistance - mostly Cursor - checked manually. If someone is going to call this "yet another AI slope" - do it without using your Claude while reviewing this PR 😆
There is also a dedicated module for the functional testing, it's installed automatically on runboat deployments.
Test flow is really simple and also allows you to discover beautiful cities of Umbria:
(try “Per”, “Ass”, or “cit”) to see Umbria cities.