19.0 vanilla

This commit is contained in:
Ernad Husremovic 2026-03-09 09:30:27 +01:00
parent d1963a3c3a
commit 2d3ee4855a
7430 changed files with 2687981 additions and 2965473 deletions

View file

@ -3,18 +3,35 @@
from odoo import models
class BaseModel(models.AbstractModel):
class Base(models.AbstractModel):
_inherit = 'base'
def get_field_translations(self, field_name, langs=None):
""" get model/model_term translations for records with transifex url
"""
Get model/model_term translations for records with transifex url
:param str field_name: field name
:param list langs: languages
:return: (translations, context) where
translations: list of dicts like [{"lang": lang, "source": source_term, "value": value_term,
"module": module, "transifexURL": transifex_url}]
context: {"translation_type": "text"/"char", "translation_show_source": True/False}
:return: a 2-items tuple ``(translations, context)`` where
translations:
list of dicts like::
[{
"lang": lang,
"source": source_term,
"value": value_term,
"module": module,
"transifexURL": transifex_url
}]
context:
dict like::
{"translation_type": "text"/"char",
"translation_show_source": True/False}
"""
translations, context = super().get_field_translations(field_name, langs=langs)
external_id = self.get_external_id().get(self.id)