Use length of the name field of translation as fallback of substring

Closes #14623
(grafted from e5b340d466415b9fd383e4f5e94708860994aedb)

--HG--
branch : 7.0
This commit is contained in:
Cédric Krier
2026-02-24 09:19:16 +01:00
parent c647666536
commit 14621497ad
+2 -2
View File
@@ -14,7 +14,7 @@ from relatorio.templates.opendocument import get_zip_file
from sql import Column, Literal, Null
from sql.aggregate import Max
from sql.conditionals import Case
from sql.functions import Position, Substring
from sql.functions import CharLength, Position, Substring
from trytond.cache import Cache
from trytond.config import config
@@ -295,7 +295,7 @@ class Translation(ModelSQL, ModelView):
Case((
Position(',', table.name) > 0,
Position(',', table.name) - 1),
else_=0)), value)))]
else_=CharLength(table.name))), value)))]
@classmethod
def get_language(cls):