Public release from ruodoo-project: 19.0 - 2026-05-10 21:19:01 UTC

This commit is contained in:
CI Publish Bot
2026-05-10 21:19:11 +00:00
commit cbf9e6e6d6
1213 changed files with 183945 additions and 0 deletions

View File

@ -0,0 +1,36 @@
# Copyright 2022-2023 Ivan Yelizariev <https://twitter.com/yelizariev>
# License OPL-1 (https://www.odoo.com/documentation/user/14.0/legal/licenses/licenses.html#odoo-apps)
import inspect
import logging
import types
import odoo
from odoo.tools.translate import _
from .models.ir_translation import debrand
_logger = logging.getLogger(__name__)
_get_translation_original = _.get_translation
def _get_translation(self, source, module=None):
source = _get_translation_original(source, module)
frame = inspect.currentframe().f_back.f_back
try:
(cr, dummy) = _._get_cr(frame, allow_create=False)
except AttributeError:
return source
try:
uid = self._get_uid(frame)
except Exception:
return source
if cr and uid:
env = odoo.api.Environment(cr, uid, {})
source = debrand(env, source)
return source
_.get_translation = types.MethodType(_get_translation, _)