odoo/o-spreadsheet#3843

Created by Dhrutik Patel (dhrp)
label
odoo:17.0-fix-dropdown-list-duplicate-values-dhrp
head
088e01fd08796cd59319512db5317039b929b190
target
17.0
merged
2 months ago by BI, Adrien Minne (adrm)
forward-ports

[FIX] TextValueProvider: duplicate values in dropdown list

## Description:

Previously, when creating data validation with either a list of values or a range of values, it resulted in an error being thrown by the auto-complete dropdown. This occurred because the values were being used as keys, and by definition, having duplicate keys in a list is nonsensical.

This PR addresses the problem by eliminating duplicate values from the list.

Task: : [3768392](https://www.odoo.com/web#id=3768392&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