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

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.

@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 ""

@edlopen edlopen force-pushed the 16.0-fix-account_chart_update_multilang-fields_without_translations branch from 7b28793 to 3d27542 Compare January 9, 2025 07:38
…tions may raise errors as its fetched by the wizard but has no translated value

@moduon MT-8280
@edlopen edlopen force-pushed the 16.0-fix-account_chart_update_multilang-fields_without_translations branch from 3d27542 to c3b4036 Compare January 9, 2025 07:41
Copy link
Member

@yajo yajo left a comment

Choose a reason for hiding this comment

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

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

Sorry @yajo you are not allowed to merge.

To do so you must either have push permissions on the repository, or be a declared maintainer of all modified addons.

If you wish to adopt an addon and become it's maintainer, open a pull request to add your GitHub login to the maintainers key of its manifest.

Copy link
Member

@rafaelbn rafaelbn left a comment

Choose a reason for hiding this comment

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

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

On my way to merge this fine PR!
Prepared branch 16.0-ocabot-merge-pr-2002-by-rafaelbn-bump-patch, awaiting test results.

@rafaelbn rafaelbn added this to the 16.0 milestone Jan 13, 2025
@OCA-git-bot OCA-git-bot merged commit 6a042df into OCA:16.0 Jan 13, 2025
9 of 11 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at a8c69ea. Thanks a lot for contributing to OCA. ❤️

@yajo yajo deleted the 16.0-fix-account_chart_update_multilang-fields_without_translations branch January 13, 2025 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants