odoo/o-spreadsheet#3868

Created by fw-bot
label
odoo:17.0-16.0-fix-autocomplete-weird-behavior-dhrp-urqC-fw
head
9f61761c8bc04b8bcefcee0e22216be6eb44c6b0
target
17.0
merged
2 months ago by BI, RĂ©mi Rahir (rar)
forward-port of
odoo/o-spreadsheet#3834 DETACHED (conflicts: ('b9209d41eb7fdb3edcda723946535cc5d4500980', 'Auto-merging src/components/composer/composer/composer.ts\nCONFLICT (content): Merge conflict in src/components/composer/composer/composer.ts\nAuto-merging tests/composer/autocomplete_dropdown_component.test.ts\nCONFLICT (content): Merge conflict in tests/composer/autocomplete_dropdown_component.test.ts\n', '13:16:26.272408 git.c:463 trace: built-in: git cherry-pick b9209d41eb7fdb3edcda723946535cc5d4500980\nerror: could not apply b9209d41e... [FIX] Composer: weird behavior of autocomplete dropdown\nhint: After resolving the conflicts, mark them with\nhint: "git add/rm <pathspec>", then run\nhint: "git cherry-pick --continue".\nhint: You can instead skip this commit with "git cherry-pick --skip".\nhint: To abort and get back to the state before "git cherry-pick",\nhint: run "git cherry-pick --abort".\n----------\nstatus:\n', ['b9209d41eb7fdb3edcda723946535cc5d4500980']) ('b9209d41eb7fdb3edcda723946535cc5d4500980', 'Auto-merging src/components/composer/composer/composer.ts\nCONFLICT (content): Merge conflict in src/components/composer/composer/composer.ts\nAuto-merging tests/composer/autocomplete_dropdown_component.test.ts\nCONFLICT (content): Merge conflict in tests/composer/autocomplete_dropdown_component.test.ts\n', '13:16:26.272408 git.c:463 trace: built-in: git cherry-pick b9209d41eb7fdb3edcda723946535cc5d4500980\nerror: could not apply b9209d41e... [FIX] Composer: weird behavior of autocomplete dropdown\nhint: After resolving the conflicts, mark them with\nhint: "git add/rm <pathspec>", then run\nhint: "git cherry-pick --continue".\nhint: You can instead skip this commit with "git cherry-pick --skip".\nhint: To abort and get back to the state before "git cherry-pick",\nhint: run "git cherry-pick --abort".\n----------\nstatus:\n', ['b9209d41eb7fdb3edcda723946535cc5d4500980']))

[FW][FIX] Composer: weird behavior of autocomplete dropdown

## Description:

Previously, when users typed "=S" in the composer, clicked outside, then started editing another cell, the autocomplete dropdown remained visible. Similarly, when they typed "=SUM(" and pressed enter, then edited another cell, the function assistant persisted.

This PR addresses the problem by ensuring that state values are set to false whenever the composer is not in edit mode.

Task: : [3789473](https://www.odoo.com/web#id=3789473&action=333&active_id=2328&model=project.task&view_type=form&cids=1&menu_id=4720)

## review checklist

- [ ] feature is organized in plugin, or UI components
- [ ] support of duplicate sheet (deep copy)
- [ ] in model/core: ranges are Range object, and can be adapted (adaptRanges)
- [ ] in model/UI: ranges are strings (to show the user)
- [ ] undo-able commands (uses this.history.update)
- [ ] multiuser-able commands (has inverse commands and transformations where needed)
- [ ] new/updated/removed commands are documented
- [ ] exportable in excel
- [ ] translations (\_t("qmsdf %s", abc))
- [ ] unit tested
- [ ] clean commented code
- [ ] track breaking changes
- [ ] doc is rebuild (npm run doc)
- [ ] status is correct in Odoo

Forward-Port-Of: odoo/o-spreadsheet#3867
Forward-Port-Of: odoo/o-spreadsheet#3834