<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/addons/l10n_multilang/models, branch 14.0</title>
<subtitle>The current checkout of upstream Odoo</subtitle>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/'/>
<entry>
<title>[FIX] l10n_multilang: COA translations overwritten with new company</title>
<updated>2020-12-28T16:27:45+00:00</updated>
<author>
<name>nie</name>
<email>nie@odoo.com</email>
</author>
<published>2020-12-18T10:56:51+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=45e6309aa1d79d06c7110c86205781874ab44e30'/>
<id>45e6309aa1d79d06c7110c86205781874ab44e30</id>
<content type='text'>
Steps:
- Install "Belgium - Accounting" and "Accounting"
- Add the Dutch language in settings
- Select a Belgian company
- Go to Accounting &gt; Configuration &gt; Chart of Account
- Select an account like "755000 Financial income - Foreign currency translation differences"
- Change the translation of the account name in English and Dutch
- Create a new company in Settings &gt; Companies
- Select this new company
- Go to Accounting &gt; Configuration &gt; Settings, set the Fiscal Localization to Belgian PCMN and save
- Return in the first company
- Go to Accounting &gt; Configuration &gt; Chart of Account and check the translations you previously set

Bug:
The Dutch translation has been reset and the English one remains the same.

Explanation:
`process_coa_translations()` uses `spoken_languages` as seen here:
https://github.com/odoo/odoo/blob/bb31ce3bc6c0c7e1e101d93924eccea995206733/addons/l10n_multilang/models/l10n_multilang.py#L67
The spoken languages are defined here: https://github.com/odoo/odoo/blob/f4e7e06a1ff9756471d55138575c758f456b5905/addons/l10n_be/data/account_chart_template_data.xml#L10
This is why English is not affected.

The bug appeared with https://github.com/odoo/odoo/commit/c346e7af3314ce504fe3add9e9f6a4839bcad64a
It was meant to apply Chart of Account translations on the current company but applied it on all the companies. This reset edited translations on the other companies.

This commit refactors `process_coa_translations()` so that we can use the same logic on a single company while keeping the definition of the original function intact.

opw:2376334

closes odoo/odoo#63845

X-original-commit: 2ae36b29239077bb604e1c6e83c749a9b839be11
Signed-off-by: backspac &lt;backspac@users.noreply.github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Steps:
- Install "Belgium - Accounting" and "Accounting"
- Add the Dutch language in settings
- Select a Belgian company
- Go to Accounting &gt; Configuration &gt; Chart of Account
- Select an account like "755000 Financial income - Foreign currency translation differences"
- Change the translation of the account name in English and Dutch
- Create a new company in Settings &gt; Companies
- Select this new company
- Go to Accounting &gt; Configuration &gt; Settings, set the Fiscal Localization to Belgian PCMN and save
- Return in the first company
- Go to Accounting &gt; Configuration &gt; Chart of Account and check the translations you previously set

Bug:
The Dutch translation has been reset and the English one remains the same.

Explanation:
`process_coa_translations()` uses `spoken_languages` as seen here:
https://github.com/odoo/odoo/blob/bb31ce3bc6c0c7e1e101d93924eccea995206733/addons/l10n_multilang/models/l10n_multilang.py#L67
The spoken languages are defined here: https://github.com/odoo/odoo/blob/f4e7e06a1ff9756471d55138575c758f456b5905/addons/l10n_be/data/account_chart_template_data.xml#L10
This is why English is not affected.

The bug appeared with https://github.com/odoo/odoo/commit/c346e7af3314ce504fe3add9e9f6a4839bcad64a
It was meant to apply Chart of Account translations on the current company but applied it on all the companies. This reset edited translations on the other companies.

This commit refactors `process_coa_translations()` so that we can use the same logic on a single company while keeping the definition of the original function intact.

opw:2376334

closes odoo/odoo#63845

X-original-commit: 2ae36b29239077bb604e1c6e83c749a9b839be11
Signed-off-by: backspac &lt;backspac@users.noreply.github.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] l10n_multilang: method for loading translations was renamed</title>
<updated>2020-06-10T12:02:12+00:00</updated>
<author>
<name>Josse Colpaert</name>
<email>jco@odoo.com</email>
</author>
<published>2020-06-09T13:24:22+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=023351b71e544753afe52bbe8e2ded60c2a511a0'/>
<id>023351b71e544753afe52bbe8e2ded60c2a511a0</id>
<content type='text'>
A method was written to copy translations from the template objects
(chart template) to the instantiated chart of accounts when installing
a multilang coa.  (e.g. to have the translations on the accounts, taxes, ...)

The problem was that to call this functionality, this module inherited
 a method, that was renamed in the meantime.  The consequence being that
this method was never called.

We renamed the method correctly here.

closes odoo/odoo#52769

X-original-commit: bb31ce3bc6c0c7e1e101d93924eccea995206733
Signed-off-by: Nicolas Martinelli (nim) &lt;nim@odoo.com&gt;
Signed-off-by: Josse Colpaert &lt;jco@openerp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A method was written to copy translations from the template objects
(chart template) to the instantiated chart of accounts when installing
a multilang coa.  (e.g. to have the translations on the accounts, taxes, ...)

The problem was that to call this functionality, this module inherited
 a method, that was renamed in the meantime.  The consequence being that
this method was never called.

We renamed the method correctly here.

closes odoo/odoo#52769

X-original-commit: bb31ce3bc6c0c7e1e101d93924eccea995206733
Signed-off-by: Nicolas Martinelli (nim) &lt;nim@odoo.com&gt;
Signed-off-by: Josse Colpaert &lt;jco@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] l10n_multilang: allow the translation of the account groups</title>
<updated>2020-03-24T13:36:15+00:00</updated>
<author>
<name>william</name>
<email>wan@odoo.com</email>
</author>
<published>2020-03-17T09:34:29+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=9eba957e0d6e3fe732445a4334c0b70ef2e2454f'/>
<id>9eba957e0d6e3fe732445a4334c0b70ef2e2454f</id>
<content type='text'>
Before, only accounts, fiscal position, tags and taxes were
translatable, now account groups are too.

X-original-commit: da571b354293e852c1c4828f758eace8e6ededa4</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before, only accounts, fiscal position, tags and taxes were
translatable, now account groups are too.

X-original-commit: da571b354293e852c1c4828f758eace8e6ededa4</pre>
</div>
</content>
</entry>
<entry>
<title>[MERGE] forward port branch saas-12.4 up to 4a1321bc99d</title>
<updated>2019-09-20T14:33:54+00:00</updated>
<author>
<name>Christophe Simonis</name>
<email>chs@odoo.com</email>
</author>
<published>2019-09-20T14:16:48+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=58a83d12228fbbd4e9dde542e133d264204ee0f3'/>
<id>58a83d12228fbbd4e9dde542e133d264204ee0f3</id>
<content type='text'>
closes odoo/odoo#37127

Signed-off-by: Christophe Simonis &lt;chs@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
closes odoo/odoo#37127

Signed-off-by: Christophe Simonis &lt;chs@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] l10n_multilang: ignore customized data conflict</title>
<updated>2019-09-10T19:04:53+00:00</updated>
<author>
<name>Nicolas Lempereur</name>
<email>nle@odoo.com</email>
</author>
<published>2019-09-09T09:28:50+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=10f15a4fafff9989df15b64a73c483af522c2d7c'/>
<id>10f15a4fafff9989df15b64a73c483af522c2d7c</id>
<content type='text'>
If you:

- have a multilang COA
- create an account.account manually
- add a XML ID with structure {company_id}_{anything} manually
- reload COA translations (install COA language, install COA, set
  installed COA since c346e7af3)

=&gt; there is an error since the code try to copy translations of
account.account.template associated to custom XML ID.

fix: ignore this torcivous use case

fixes #36310
opw-2063207
closes #36544

closes odoo/odoo#36659

X-original-commit: 0fc0b7484c48fbdcf549e199b5c8cabff3ab726c
Signed-off-by: Nicolas Lempereur (nle) &lt;nle@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If you:

- have a multilang COA
- create an account.account manually
- add a XML ID with structure {company_id}_{anything} manually
- reload COA translations (install COA language, install COA, set
  installed COA since c346e7af3)

=&gt; there is an error since the code try to copy translations of
account.account.template associated to custom XML ID.

fix: ignore this torcivous use case

fixes #36310
opw-2063207
closes #36544

closes odoo/odoo#36659

X-original-commit: 0fc0b7484c48fbdcf549e199b5c8cabff3ab726c
Signed-off-by: Nicolas Lempereur (nle) &lt;nle@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[MERGE] forward port branch saas-12.4 up to fe59754c520</title>
<updated>2019-09-13T13:32:51+00:00</updated>
<author>
<name>Christophe Simonis</name>
<email>chs@odoo.com</email>
</author>
<published>2019-09-13T13:32:51+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=5a273e74f0fff18df5ab6cb240c9e260be4bb7ff'/>
<id>5a273e74f0fff18df5ab6cb240c9e260be4bb7ff</id>
<content type='text'>
closes odoo/odoo#36721

Signed-off-by: Christophe Simonis &lt;chs@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
closes odoo/odoo#36721

Signed-off-by: Christophe Simonis &lt;chs@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] l10n_*: translate COA on load without install</title>
<updated>2019-08-27T11:19:10+00:00</updated>
<author>
<name>Nicolas Lempereur</name>
<email>nle@odoo.com</email>
</author>
<published>2019-08-22T14:29:00+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=c346e7af3314ce504fe3add9e9f6a4839bcad64a'/>
<id>c346e7af3314ce504fe3add9e9f6a4839bcad64a</id>
<content type='text'>
When a COA is installed being loaded for current company, the
translations of taxes, account name, ... (in l10n_be, l10n_ca, l10n_ch,
l10n_sa) are copied from the templates to the accounting records.

This is done in `post_init_hook` which is correct since then
translations are available to be copied.

But when an accounting localization is already installed and we set it
to a company, the translations are not copied.

eg. install l10n_be for company1: accounts name are translated in
french and dutch, set company2 to belgian accounting: only original
language is available.

With this changeset, the translation copy is also performed when an
accounting localization is loaded for a company after it has been
installed.

note: if we install language for first times after setting accounting
localizations, chart of account are translated in that language.

opw-2047013
closes #35985

Signed-off-by: Nicolas Lempereur (nle) &lt;nle@odoo.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When a COA is installed being loaded for current company, the
translations of taxes, account name, ... (in l10n_be, l10n_ca, l10n_ch,
l10n_sa) are copied from the templates to the accounting records.

This is done in `post_init_hook` which is correct since then
translations are available to be copied.

But when an accounting localization is already installed and we set it
to a company, the translations are not copied.

eg. install l10n_be for company1: accounts name are translated in
french and dutch, set company2 to belgian accounting: only original
language is available.

With this changeset, the translation copy is also performed when an
accounting localization is loaded for a company after it has been
installed.

note: if we install language for first times after setting accounting
localizations, chart of account are translated in that language.

opw-2047013
closes #35985

Signed-off-by: Nicolas Lempereur (nle) &lt;nle@odoo.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] l10n_multilang: Added translate True on account.tax.report.line</title>
<updated>2019-08-05T14:38:52+00:00</updated>
<author>
<name>Meghna Jaswani</name>
<email>mja@odoo.com</email>
</author>
<published>2019-08-01T09:33:41+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=9b49f0007896549e0dc71de7bd2de5d29ec08dc1'/>
<id>9b49f0007896549e0dc71de7bd2de5d29ec08dc1</id>
<content type='text'>
Both the name and the tag_name need to be set as translatable.
As the tag_name is seen by the user for the configuration.

Unlike the financial reports that are linked to multiple countries,
the tax report is linked to just one country. This way it makes sense
to only make it translatable in multilang.

Task: 2042430

closes odoo/odoo#35436

Signed-off-by: Josse Colpaert &lt;jco@openerp.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Both the name and the tag_name need to be set as translatable.
As the tag_name is seen by the user for the configuration.

Unlike the financial reports that are linked to multiple countries,
the tax report is linked to just one country. This way it makes sense
to only make it translatable in multilang.

Task: 2042430

closes odoo/odoo#35436

Signed-off-by: Josse Colpaert &lt;jco@openerp.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] *: use res.lang methods</title>
<updated>2019-08-07T13:06:17+00:00</updated>
<author>
<name>Martin Trigaux</name>
<email>mat@odoo.com</email>
</author>
<published>2019-08-06T15:07:41+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=85ee046b37c7c9a0dc7f052b8258f81774b127de'/>
<id>85ee046b37c7c9a0dc7f052b8258f81774b127de</id>
<content type='text'>
get_installed and _lang_get_id are both ormcached and correctly check
the context

Retrieving a res.lang from a code is a frequent action that can be
achieved with _lang_get (cf previous commit).
Using _lang_get ensure the active_test in the context is correct and
is not poluted with another context propagation issue.
odoo/odoo#35490 discussion is an example of bad context propagation

closes odoo/odoo#35504

Signed-off-by: Martin Trigaux (mat) &lt;mat@odoo.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
get_installed and _lang_get_id are both ormcached and correctly check
the context

Retrieving a res.lang from a code is a frequent action that can be
achieved with _lang_get (cf previous commit).
Using _lang_get ensure the active_test in the context is correct and
is not poluted with another context propagation issue.
odoo/odoo#35490 discussion is an example of bad context propagation

closes odoo/odoo#35504

Signed-off-by: Martin Trigaux (mat) &lt;mat@odoo.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[REM] *: calls to @api.multi</title>
<updated>2019-07-17T12:13:12+00:00</updated>
<author>
<name>Adrian Torres</name>
<email>adt@odoo.com</email>
</author>
<published>2019-07-10T12:59:37+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=4b38cc6590abcb58a0ca102a06063eb3db7ac1f4'/>
<id>4b38cc6590abcb58a0ca102a06063eb3db7ac1f4</id>
<content type='text'>
Multi is the default api for methods, it is not necessary to explicitly
decorate methods with it, adds clutter and most people use it because
they see that the rest of the code uses it.

Done with `find . -type f -name '*.py' | xargs sed -i '/@api.multi/d'`
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Multi is the default api for methods, it is not necessary to explicitly
decorate methods with it, adds clutter and most people use it because
they see that the rest of the code uses it.

Done with `find . -type f -name '*.py' | xargs sed -i '/@api.multi/d'`
</pre>
</div>
</content>
</entry>
</feed>
