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

[17.0][MIG] account_multicurrency_revaluation #302

Open
wants to merge 86 commits into
base: 17.0
Choose a base branch
from

Conversation

Qlasta
Copy link

@Qlasta Qlasta commented Aug 28, 2024

migrate v16.0 to v17.0, with fix reverse_revaluate_currency wizard post.

File "/mnt/data/odoo-addons-dir/account_multicurrency_revaluation/wizard/wizard_reverse_currency_revaluation.py", line 77, in reverse_revaluate_currency
entry.post()
AttributeError: 'account.move' object has no attribute 'post'

hbto and others added 30 commits August 28, 2024 15:44
- getting rid of validation because rate will always be at least '1.0' because
of (res.currency)_get_rates query

- create just one Journal Entry per Currency Revaluation run depending the
account type
Currently translated at 98.8% (80 of 81 strings)

Translation: account-closing-12.0/account-closing-12.0-account_multicurrency_revaluation
Translate-URL: https://translation.odoo-community.org/projects/account-closing-12-0/account-closing-12-0-account_multicurrency_revaluation/es/
Currently translated at 100.0% (81 of 81 strings)

Translation: account-closing-12.0/account-closing-12.0-account_multicurrency_revaluation
Translate-URL: https://translation.odoo-community.org/projects/account-closing-12-0/account-closing-12-0-account_multicurrency_revaluation/es/
The override of res.currency _get_conversion_rate did return 1.0 / from_currency.rate
when 'revaluation' was True in context.
However, as res.currency.rate is defined per company and the context is only
used for a computation to the company currency, the std method from odoo will also
return 1.0 / from_currency.rate, because to_currency is the company currency.
(https://github.com/odoo/odoo/blob/11.0/odoo/addons/base/res/res_currency.py#L179)
Therefore, we do not need this override.
This line was already commented in v7.0, so we do not need to keep it across all versions
Currently translated at 100.0% (81 of 81 strings)

Translation: account-closing-12.0/account-closing-12.0-account_multicurrency_revaluation
Translate-URL: https://translation.odoo-community.org/projects/account-closing-12-0/account-closing-12-0-account_multicurrency_revaluation/fr/
Currently translated at 100.0% (80 of 80 strings)

Translation: account-closing-13.0/account-closing-13.0-account_multicurrency_revaluation
Translate-URL: https://translation.odoo-community.org/projects/account-closing-13-0/account-closing-13-0-account_multicurrency_revaluation/es_AR/
Currently translated at 7.5% (6 of 80 strings)

Translation: account-closing-13.0/account-closing-13.0-account_multicurrency_revaluation
Translate-URL: https://translation.odoo-community.org/projects/account-closing-13-0/account-closing-13-0-account_multicurrency_revaluation/zh_CN/
Currently translated at 100.0% (82 of 82 strings)

Translation: account-closing-13.0/account-closing-13.0-account_multicurrency_revaluation
Translate-URL: https://translation.odoo-community.org/projects/account-closing-13-0/account-closing-13-0-account_multicurrency_revaluation/es_AR/
* Odoo 14.0 changes that impact this module are in below commit.
    * odoo/odoo@caeb782
    * `process_reconciliation` has been changed to `reconcile`, and
      `balance` (positive for debit > credit) is used instead of debit+credit;
    * Bank Journal should have suspense account.
Currently translated at 4.8% (4 of 82 strings)

Translation: account-closing-15.0/account-closing-15.0-account_multicurrency_revaluation
Translate-URL: https://translation.odoo-community.org/projects/account-closing-15-0/account-closing-15-0-account_multicurrency_revaluation/it/
Currently translated at 4.8% (4 of 82 strings)

Translation: account-closing-15.0/account-closing-15.0-account_multicurrency_revaluation
Translate-URL: https://translation.odoo-community.org/projects/account-closing-15-0/account-closing-15-0-account_multicurrency_revaluation/it/
GuillemCForgeFlow and others added 28 commits August 28, 2024 15:44
Two-sided relation between lines created and original ones
…nciled items

If the origin line that will be revaluated has partially reconciled items, adjust the values to the real ones.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: account-closing-16.0/account-closing-16.0-account_multicurrency_revaluation
Translate-URL: https://translation.odoo-community.org/projects/account-closing-16-0/account-closing-16-0-account_multicurrency_revaluation/
Currently translated at 100.0% (110 of 110 strings)

Translation: account-closing-16.0/account-closing-16.0-account_multicurrency_revaluation
Translate-URL: https://translation.odoo-community.org/projects/account-closing-16-0/account-closing-16-0-account_multicurrency_revaluation/es/
Co-authored-by: Alexis de Lattre <[email protected]>
Currently translated at 100.0% (110 of 110 strings)

Translation: account-closing-16.0/account-closing-16.0-account_multicurrency_revaluation
Translate-URL: https://translation.odoo-community.org/projects/account-closing-16-0/account-closing-16-0-account_multicurrency_revaluation/sv/
Currently translated at 100.0% (110 of 110 strings)

Translation: account-closing-16.0/account-closing-16.0-account_multicurrency_revaluation
Translate-URL: https://translation.odoo-community.org/projects/account-closing-16-0/account-closing-16-0-account_multicurrency_revaluation/sv/
Currently translated at 99.0% (109 of 110 strings)

Translation: account-closing-16.0/account-closing-16.0-account_multicurrency_revaluation
Translate-URL: https://translation.odoo-community.org/projects/account-closing-16-0/account-closing-16-0-account_multicurrency_revaluation/it/
Currently translated at 99.0% (109 of 110 strings)

Translation: account-closing-16.0/account-closing-16.0-account_multicurrency_revaluation
Translate-URL: https://translation.odoo-community.org/projects/account-closing-16-0/account-closing-16-0-account_multicurrency_revaluation/it/
Currently translated at 100.0% (110 of 110 strings)

Translation: account-closing-16.0/account-closing-16.0-account_multicurrency_revaluation
Translate-URL: https://translation.odoo-community.org/projects/account-closing-16-0/account-closing-16-0-account_multicurrency_revaluation/fa/
Currently translated at 10.0% (11 of 110 strings)

Translation: account-closing-16.0/account-closing-16.0-account_multicurrency_revaluation
Translate-URL: https://translation.odoo-community.org/projects/account-closing-16-0/account-closing-16-0-account_multicurrency_revaluation/hr/
Currently translated at 26.3% (29 of 110 strings)

Translation: account-closing-16.0/account-closing-16.0-account_multicurrency_revaluation
Translate-URL: https://translation.odoo-community.org/projects/account-closing-16-0/account-closing-16-0-account_multicurrency_revaluation/hr/
Currently translated at 100.0% (110 of 110 strings)

Translation: account-closing-16.0/account-closing-16.0-account_multicurrency_revaluation
Translate-URL: https://translation.odoo-community.org/projects/account-closing-16-0/account-closing-16-0-account_multicurrency_revaluation/it/
[IMP] fix settings view, demo data, tests, wizard post.

[IMP] naming, structure according to dev guidelines.

[IMP] remove old readme, readonly from model fields.
@Qlasta Qlasta mentioned this pull request Aug 28, 2024
5 tasks
created_entries.write(vals)
if self.journal_id.company_id.auto_post_entries:
for entry in created_entries:
entry.action_post()
Copy link
Author

Choose a reason for hiding this comment

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

fixed error:

File "/mnt/data/odoo-addons-dir/account_multicurrency_revaluation/wizard/wizard_reverse_currency_revaluation.py", line 77, in reverse_revaluate_currency
entry.post()
AttributeError: 'account.move' object has no attribute 'post'

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.