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] [account, l10n_multilang] Translations disappear after module update #107599

Closed
feelwhy opened this issue Dec 9, 2022 · 3 comments
Closed

Comments

@feelwhy
Copy link

feelwhy commented Dec 9, 2022

Impacted versions:
16.0

Steps to reproduce:

  1. The module 'Multi Language Chart of Accounts' (l10n_multilang) should be installed;
  2. Translate any field assumed by that module. For example, a tax name (the model account.tax; the field name);
  3. Upgrade the module 'Invoicing' (account).

Current behavior:
The filed translation is replaced with the source translation. So, the 'tax name' from the example is no anymore translated.

Expected behavior:
All translations should be kept disregarding modules update or a server restart.

Notes:
Actually, the issue is wider than just multi-lingual accounting. The same might be reproduced in any inherited module when the field attribute 'translate' is introduced for the inherited field (while the field in the original module doesn't have that attribute or have translate=False). Thus, most probably, the issue will affect a number of other modules and functional areas.

@StefanRijnhart
Copy link
Contributor

StefanRijnhart commented Dec 14, 2022

Confirmed. After the installation of l10n_multilang and the installation of the NL language, the translations are dropped from the columns that l10n_multilang makes translateable when the analytic and account modules are updated. For instance account.analytic.account's name. Before the translation:

16multilang=> select name from account_analytic_account where id = 16;
                          name
--------------------------------------------------------
 {"en_US": "Administrative", "nl_NL": "Administratief"}
(1 row)

After an update of all modules:

16multilang=> select name from account_analytic_account where id = 16;
            name
-----------------------------
 {"en_US": "Administrative"}
(1 row)

Translation is lost because the column is converted back to single-language varchar on the update of the analytic module, and is then converted back to jsonb by the update of l10n_multilang.

@AungKoKoLin1997
Copy link
Contributor

Now I see there is a PR to solve this issue #109868 .

gkliska added a commit to ecodica/odoo that referenced this issue Feb 6, 2023
@yostashiro
Copy link
Contributor

For the record, this commit 06f903c should have fixed the issue.

@feelwhy feelwhy closed this as completed Feb 22, 2023
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

No branches or pull requests

4 participants