Skip to content

Commit ca848eb

Browse files
committed
[IMP] util/orm: do not tweak res.users.lang cache validation
`res.users.lang` is a widely used field in the ORM that it's better to not mess with for performance reasons. If a DB has invalid codes the ORM would deal with them graciously. closes #103 Signed-off-by: Christophe Simonis (chs) <[email protected]>
1 parent 94c0314 commit ca848eb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/util/orm.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,8 @@ def no_selection_cache_validation(f=None):
222222
old_convert = ofields.Selection.convert_to_cache
223223

224224
def _convert(self, value, record, validate=True):
225+
if self.model_name == "res.users" and self.name == "lang":
226+
return old_convert(self, value, record, validate=validate)
225227
return old_convert(self, value, record, validate=False)
226228

227229
if f is None:

0 commit comments

Comments
 (0)