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

[18.0][MIG] account_financial_report: Migration to 18.0 #1253

Open
wants to merge 312 commits into
base: 18.0
Choose a base branch
from

Conversation

chaule97
Copy link

@chaule97 chaule97 commented Nov 22, 2024

eduaparicio and others added 30 commits November 13, 2024 10:06
Currently translated at 100.0% (329 of 329 strings)

Translation: account-financial-reporting-12.0/account-financial-reporting-12.0-account_financial_report
Translate-URL: https://translation.odoo-community.org/projects/account-financial-reporting-12-0/account-financial-reporting-12-0-account_financial_report/pt_BR/
Currently translated at 100.0% (329 of 329 strings)

Translation: account-financial-reporting-12.0/account-financial-reporting-12.0-account_financial_report
Translate-URL: https://translation.odoo-community.org/projects/account-financial-reporting-12-0/account-financial-reporting-12-0-account_financial_report/pt_BR/
The number of computed account can be greater in certain databases with l10n modules.
Currently translated at 10.3% (34 of 329 strings)

Translation: account-financial-reporting-12.0/account-financial-reporting-12.0-account_financial_report
Translate-URL: https://translation.odoo-community.org/projects/account-financial-reporting-12-0/account-financial-reporting-12-0-account_financial_report/fr/
Currently translated at 100.0% (329 of 329 strings)

Translation: account-financial-reporting-12.0/account-financial-reporting-12.0-account_financial_report
Translate-URL: https://translation.odoo-community.org/projects/account-financial-reporting-12-0/account-financial-reporting-12-0-account_financial_report/pt_BR/
Currently translated at 23.1% (76 of 329 strings)

Translation: account-financial-reporting-12.0/account-financial-reporting-12.0-account_financial_report
Translate-URL: https://translation.odoo-community.org/projects/account-financial-reporting-12-0/account-financial-reporting-12-0-account_financial_report/fr/
Currently translated at 23.1% (76 of 329 strings)

Translation: account-financial-reporting-12.0/account-financial-reporting-12.0-account_financial_report
Translate-URL: https://translation.odoo-community.org/projects/account-financial-reporting-12-0/account-financial-reporting-12-0-account_financial_report/fr/
…cade

`report_journal_ledger` is auto-vacuumed as any transient model, but has some
ondelete="cascade" constraints that auto-remove subtables when a record is removed,
doing this operation very slow when selecting these sub-records.

Letting default ondelete="set null" would result in same performance bottleneck,
as the select on sub-table is performed the same for setting "null" value on them.

As a solution, and for avoiding a costly index operation, we delete by SQL sub-tables
rows in advance.

A bit of extra logic has been added for avoiding to remove that records if it's not
the turn of vacuum the parent table.
Currently translated at 84.5% (278 of 329 strings)

Translation: account-financial-reporting-12.0/account-financial-reporting-12.0-account_financial_report
Translate-URL: https://translation.odoo-community.org/projects/account-financial-reporting-12-0/account-financial-reporting-12-0-account_financial_report/fr/
* centralization is only calculated on accounts where 'centralized' is True
* Cumul. Balance of each move_line fixed
* Ordering move_lines by date
* Fix trial_balance xlsx when not show_partner_details
Some reports crash if account move line implicated are Sections lines or Notes lines in an invoice
* Missing import causes failure when running Open Items with Date At in the past
Before this commit, amounts such as "10'000.00 CHF" were exceeding their
columns width. Label column could be reduced as it's printed correctly
over two different lines.
…dger Before this commit, amounts such as "10'000.00 CHF" were exceeding their columns width. Label column could be reduced as it's printed correctly over two different lines.
The second invoice created has no explicit so taking the current date could lead to failing tests because the invoice is out of search as the the setup sets date_from as time.strftime("%Y-%m-01") and date_to as time.strftime("%Y-%m-28"). So i choose the easy way by setting an explicit date for the invoice.
* Now account_ids is empty by default and required
* Domain is applied in the selection of the accounts
* added option "show_partner_details"
* filter by analytic_account
* fix speed issue in VAT report
* rename Cost Center to Analytic Account in General Ledger
SilvioC2C and others added 21 commits November 13, 2024 10:06
``analytic_distribution`` is a JSON field where keys are 'account.id' or 'account.id,account.id'
Eg: https://github.com/odoo/odoo/blob/8479b4e/addons/sale/models/account_move_line.py#L158
Previous implementation tried to convert to ``int`` the ``analytic_distribution`` dict keys, leading to a ``ValueError``.
This commit fixes this bug.
…umul cur. values in general ledger only if necessary

The currency_id field of the lines is always set, so follow the same logic as
in report/templates/general_ledger and show the data only if the currency is set
in the account.

TT51204
Currently translated at 100.0% (267 of 267 strings)

Translation: account-financial-reporting-17.0/account-financial-reporting-17.0-account_financial_report
Translate-URL: https://translation.odoo-community.org/projects/account-financial-reporting-17-0/account-financial-reporting-17-0-account_financial_report/it/
…alance (just like we display null initial balance)
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: account-financial-reporting-17.0/account-financial-reporting-17.0-account_financial_report
Translate-URL: https://translation.odoo-community.org/projects/account-financial-reporting-17-0/account-financial-reporting-17-0-account_financial_report/
Before this change, the date format in the VAT report print was not sensible to the company's localization.
The date string has been converted to a Date field to ensure the correct format aligns with the company's localization.
When porting from v14 to v17, the `account_account.user_type_id`
has been changed to `account_type`. Previously `general_ledger_wizard`
was able to store multiple account types through the `account_type_ids`
field. To simplify the forward porting, for now only one `account_type`
can be selected in the wizard.
<div class="row">
<div class="col-6 custom_footer">
<span
t-esc="context_timestamp(datetime.datetime.now()).strftime('%Y-%m-%d %H:%M')"

Choose a reason for hiding this comment

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

'default_payable_accounts_only':1,
}"
/>
<field name="groups_id" eval="[(4, ref('account.group_account_manager'))]" />

Choose a reason for hiding this comment

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

groups_id should be replaced with groups= in the element
https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-16.0

# Author: Julien Coux
# Copyright 2016 Camptocamp SA
# Copyright 2020 ForgeFlow S.L. (https://www.forgeflow.com)
# Copyright 2021 Tecnativa - Jo??o Marques

Choose a reason for hiding this comment

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

Suggested change
# Copyright 2021 Tecnativa - Jo??o Marques
# Copyright 2021 Tecnativa - João Marques

@@ -0,0 +1,13 @@
# ?? 2011 Guewen Baconnier (Camptocamp)

Choose a reason for hiding this comment

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

Suggested change
# ?? 2011 Guewen Baconnier (Camptocamp)
# © 2011 Guewen Baconnier (Camptocamp)

Choose a reason for hiding this comment

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

Check other files as well for similar issues

else:
ag_pb_data[acc_id]["older"] += residual
ag_pb_data[acc_id][prt_id]["older"] += residual
if due_date:

Choose a reason for hiding this comment

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

Is it possible to not have due_date? It is set on line 59 due_date = today

@chaule97 chaule97 force-pushed the 18.0-mig-account_financial_report branch from befa9ce to ff0b491 Compare November 25, 2024 04:38
@chaule97
Copy link
Author

Hi @henrybackman, I have optimized the query, can you check it again?

@chaule97 chaule97 force-pushed the 18.0-mig-account_financial_report branch from ff0b491 to 8f9d339 Compare November 25, 2024 07:38
@salvorapi
Copy link

LGTM

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

Successfully merging this pull request may close these issues.