[REV] Revert "[IMP] base: select countries & state based on exact code,...
[REV] Revert "[IMP] base: select countries & state based on exact code, (useful for import and fast many2one)" This reverts commit 09a22e3b, which was attempting to fix a use case that was actually working. It also created a duplicate `name_search()` method for res.country, in addition to the one aliased to `location_name_search()` It is indeed supported to import countries and states, using the country code or state code as the imported value. These will be matched uniquely thanks to the special `name_search()` performed for import, forcing the `operator`. And this is done while still allowing proper auto-completing for normal UI case, where the "exact code match" will only promote an extra result at the top of the suggested matches, rather than limit the results to a single match. The confusion apparently stemmed from the test case using "UK" as the country code. UK is not a valid ISO country code, so it would never match as expected.
Please register or sign in to comment