-
-
Notifications
You must be signed in to change notification settings - Fork 369
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][ADD] account_analytic_report: New module account_analytic_report #730
base: 17.0
Are you sure you want to change the base?
Conversation
f39c207
to
cf5484e
Compare
@pedrobaeza Does this PR need to be reviewed again? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, tested in runboat and code review
"author": "APSL-Nagarro, Odoo Community Association (OCA)", | ||
"website": "https://github.com/OCA/account-analytic", | ||
"category": "Account", | ||
"depends": ["analytic", "account_financial_report"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Depending on account_financial_report
is a very heavy one. Can you light up a bit this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm using some of the trial balance bases from this module as a base. Would it be better to just copy the necessary files from account_financial_report?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It depends on how much you are reusing and the need for that. Can you specify?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm utilizing all the abstract classes provided by the account_financial_report module for trial balances. These classes include QWeb styles and templates, Excel export functionality with styles, PDF export features and some basics for the report. Specifically, I'm inheriting the following classes: report.account_financial_report.abstract_report_xlsx, report.account_financial_report.abstract_report, and account_financial_report_abstract_wizard."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seeing the amount of code you need here, not to call super, etc, it seems you are just replacing the existing logic with your own, so I think to not depend on them isn't too much. Can you maybe do a PoC to see?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this could result in duplicated code between this module and account_financial_report. Do you think this is a viable approach? The logic for Excel generation and report styling is already provided by account_financial_report.
One alternative could be renaming this module to something like account_financial_report_analytic or account_financial_report_extension_analytic, to better reflect its relationship with the original module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still think they should be independent. You may want this feature without requiring the other. I think the coupling level is very low. Not all the declared styles in account_financial_report
are used here.
cf5484e
to
ee95c7e
Compare
New module account_analytic_report
Using this module is straightforward. Follow these steps:
Navigate to the Report:
Go to Invoicing -> Reporting -> Analytic Trial Balance.
Customize the Report with Filters:
Adjust the report using the available options:
Group by Analytic Account:
Groups the results by analytic accounts instead of financial accounts.
Show Hierarchy and Limit Hierarchy Level:
Displays the amounts split by the hierarchy levels of financial accounts.
Filter Accounts:
When used independently (without grouping by analytic accounts or showing hierarchy), the results will be split by both financial accounts.
Example: Filtering by accounts Test 1 and Test 2:
Show Months (Excel export only):
Enabled when filtering accounts without grouping by analytic accounts or showing hierarchy. It generates a separate sheet in the Excel file for each filtered account, detailing the amounts by month within the selected date range.
cc https://github.com/APSL 162352
@miquelalzanillas @lbarry-apsl @mpascuall @peluko00 @javierobcn @ppyczko please review