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

Merged
merged 313 commits into from
Dec 6, 2024

Conversation

chaule97
Copy link

@chaule97 chaule97 commented Nov 22, 2024

<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

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@victoralmau
Copy link
Member

Please add #1257 to commit history

eduaparicio and others added 19 commits November 29, 2024 15:38
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
OCA-git-bot and others added 7 commits November 29, 2024 15:38
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/
…als if the account has not set currency

Related to OCA#1235 (comment)

[FIX] account_financial_report: Avoid error in General ledger if the Show foreign currency checkbox is not checked.

Related to OCA#1236

TT51996
@chaule97 chaule97 force-pushed the 18.0-mig-account_financial_report branch from 8f9d339 to f403480 Compare November 29, 2024 09:22
@chaule97
Copy link
Author

Please add #1257 to commit history

thanks, I have added these commits

@chaule97 chaule97 force-pushed the 18.0-mig-account_financial_report branch from f403480 to 8cd27bd Compare December 2, 2024 03:47
@victoralmau
Copy link
Member

Please add #1258 to commit history.

@chaule97 chaule97 force-pushed the 18.0-mig-account_financial_report branch 2 times, most recently from e439180 to 591eec6 Compare December 4, 2024 03:29
@victoralmau
Copy link
Member

Please add #1261 to commit history.

@chaule97 chaule97 force-pushed the 18.0-mig-account_financial_report branch from 591eec6 to 01f22b8 Compare December 4, 2024 07:41
@pedrobaeza
Copy link
Member

/ocabot migration account_financial_report

@OCA-git-bot OCA-git-bot added this to the 18.0 milestone Dec 6, 2024
@OCA-git-bot OCA-git-bot mentioned this pull request Dec 6, 2024
4 tasks
Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

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

Tested on runboat

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 18.0-ocabot-merge-pr-1253-by-pedrobaeza-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 470c4f3 into OCA:18.0 Dec 6, 2024
7 checks passed
@OCA-git-bot
Copy link
Contributor

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

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.