summaryrefslogtreecommitdiff
path: root/odoo/modules
diff options
context:
space:
mode:
authorXavier Morel <xmo@odoo.com>2020-03-11 11:14:48 +0000
committerXavier Morel <xmo@odoo.com>2020-03-11 11:14:48 +0000
commitb6af34d30ea9a693b8d4cd3e473371f0fca5f013 (patch)
tree311cf7e8e00075eee2afc6875f606588cf367599 /odoo/modules
parent06dee038ddd0e2344c45d4f20e79c28fc78407de (diff)
[IMP] core: only check for the unaccent function to enable the feature
Before this the `--unaccent` flag does double duty to specify whether to create new databases with the extension *and* to try to use the corresponding function. The latter is further gated on the function existing at all in the database. Given postgresql does not have unaccent installed by default it seems only the latter is really useful and we can ignore the flag to decide whether to enable unaccent features, if the extension is installed consider that it should be enabled and move on. Merge this in master rather than previous versions as it can change things like index access / use. closes odoo/odoo#47377 Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Diffstat (limited to 'odoo/modules')
-rw-r--r--odoo/modules/registry.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/odoo/modules/registry.py b/odoo/modules/registry.py
index 9b39758a30a..b42ebc988d5 100644
--- a/odoo/modules/registry.py
+++ b/odoo/modules/registry.py
@@ -142,10 +142,7 @@ class Registry(Mapping):
self.cache_invalidated = False
with closing(self.cursor()) as cr:
- has_unaccent = odoo.modules.db.has_unaccent(cr)
- if odoo.tools.config['unaccent'] and not has_unaccent:
- _logger.warning("The option --unaccent was given but no unaccent() function was found in database.")
- self.has_unaccent = odoo.tools.config['unaccent'] and has_unaccent
+ self.has_unaccent = odoo.modules.db.has_unaccent(cr)
@classmethod
def delete(cls, db_name):