mirror of
https://github.com/bringout/oca-ocb-core.git
synced 2026-04-20 12:12:10 +02:00
19.0 vanilla
This commit is contained in:
parent
d1963a3c3a
commit
2d3ee4855a
7430 changed files with 2687981 additions and 2965473 deletions
|
|
@ -206,11 +206,8 @@ class Selection(Field[str | typing.Literal[False]]):
|
|||
# force all values to be strings (check _get_year_selection)
|
||||
return [(str(key), str(label)) for key, label in selection]
|
||||
|
||||
# translate selection labels
|
||||
if env.lang:
|
||||
return env['ir.model.fields'].get_field_selection(self.model_name, self.name)
|
||||
else:
|
||||
return selection
|
||||
translations = dict(env['ir.model.fields'].get_field_selection(self.model_name, self.name))
|
||||
return [(key, translations.get(key, label)) for key, label in selection]
|
||||
|
||||
def _default_group_expand(self, records, groups, domain):
|
||||
# return a group per selection option, in definition order
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue