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

Closes #14623
This commit is contained in:
Cédric Krier committed 2026-02-24 09:19:16 +01:00
1 parent 126d71063c
commit a81f79a497
1 file changed
+2 -2
+2 -2
View File
@@ -13,7 +13,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
import trytond.config as config
from trytond.cache import Cache
@@ -307,7 +307,7 @@ class Translation(
Case((
Position(',', table.name) > 0,
Position(',', table.name) - 1),
else_=0)), value)))]
else_=CharLength(table.name))), value)))]
@classmethod
def get_language(cls):