Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][FIX] account_chart_update: Translatable fields without transla… #2002

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from

Conversation

edlopen
Copy link
Member

@edlopen edlopen commented Dec 30, 2024

…tions may raise errors as its fetched by the wizard but has no translated value

This fix has been made in cases where there are differences in the translation but there is no prior definition in the field (e.g. the field was originally empty).

@moduon MT-8280

@EmilioPascual @yajo @rafaelbn please review, if you can.

…tions may raise errors as its fetched by the wizard but has no translated value

@moduon MT-8280
@OCA-git-bot
Copy link
Contributor

Hi @rafaelbn,
some modules you are maintaining are being modified, check this out!

stored_translation_rec = field._get_stored_translations(rec)
if not stored_translation_rec:
continue
old_value = stored_translation_rec.get(rec.env.lang, "en_US")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't you mean this?

Suggested change
old_value = stored_translation_rec.get(rec.env.lang, "en_US")
old_value = stored_translation_rec.get(rec.env.lang or "en_US") or ""

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants