-
-
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
Open
BernatObrador
wants to merge
1
commit into
OCA:17.0
Choose a base branch
from
APSL:17.0-add-account_analytic_report
base: 17.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
======================== | ||
Account Analytic Reports | ||
======================== | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:e3b2f8d263dd282038c6d240451ddf65612a4d8dfbf754af136900aa97285230 | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
|
||
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png | ||
:target: https://odoo-community.org/page/development-status | ||
:alt: Beta | ||
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png | ||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
:alt: License: AGPL-3 | ||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--analytic-lightgray.png?logo=github | ||
:target: https://github.com/OCA/account-analytic/tree/17.0/account_analytic_report | ||
:alt: OCA/account-analytic | ||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
:target: https://translation.odoo-community.org/projects/account-analytic-17-0/account-analytic-17-0-account_analytic_report | ||
:alt: Translate me on Weblate | ||
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png | ||
:target: https://runboat.odoo-community.org/builds?repo=OCA/account-analytic&target_branch=17.0 | ||
:alt: Try me on Runboat | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
This module introduces an analytic report that provides an intuitive way | ||
to view and analyze analytic balances. It simplifies the process, | ||
offering enhanced insights and making it easier to leverage this | ||
information effectively. | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Usage | ||
===== | ||
|
||
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*: | ||
|
||
.. code:: text | ||
|
||
| Initial Balance | Test 1 | Test 2 | Ending Balance | ||
400000 | 0 | $3600 | $2400 | $6000 | ||
|
||
- | **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. | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-analytic/issues>`_. | ||
In case of trouble, please check there if your issue has already been reported. | ||
If you spotted it first, help us to smash it by providing a detailed and welcomed | ||
`feedback <https://github.com/OCA/account-analytic/issues/new?body=module:%20account_analytic_report%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. | ||
|
||
Do not contact contributors directly about support or help with technical issues. | ||
|
||
Credits | ||
======= | ||
|
||
Authors | ||
------- | ||
|
||
* APSL-Nagarro | ||
|
||
Contributors | ||
------------ | ||
|
||
- `APSL-Nagarro <https://apsl.tech>`__: | ||
|
||
- Bernat Obrador | ||
- Miquel Alzanillas | ||
|
||
Maintainers | ||
----------- | ||
|
||
This module is maintained by the OCA. | ||
|
||
.. image:: https://odoo-community.org/logo.png | ||
:alt: Odoo Community Association | ||
:target: https://odoo-community.org | ||
|
||
OCA, or the Odoo Community Association, is a nonprofit organization whose | ||
mission is to support the collaborative development of Odoo features and | ||
promote its widespread use. | ||
|
||
.. |maintainer-BernatObrador| image:: https://github.com/BernatObrador.png?size=40px | ||
:target: https://github.com/BernatObrador | ||
:alt: BernatObrador | ||
.. |maintainer-miquelalzanillas| image:: https://github.com/miquelalzanillas.png?size=40px | ||
:target: https://github.com/miquelalzanillas | ||
:alt: miquelalzanillas | ||
|
||
Current `maintainers <https://odoo-community.org/page/maintainer-role>`__: | ||
|
||
|maintainer-BernatObrador| |maintainer-miquelalzanillas| | ||
|
||
This module is part of the `OCA/account-analytic <https://github.com/OCA/account-analytic/tree/17.0/account_analytic_report>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
from . import report | ||
from . import wizard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Copyright 2024 (APSL - Nagarro) Bernat Obrador | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
{ | ||
"name": "Account Analytic Reports", | ||
"version": "17.0.1.0.0", | ||
"summary": "OCA Analytic Reports", | ||
"author": "APSL-Nagarro, Odoo Community Association (OCA)", | ||
"website": "https://github.com/OCA/account-analytic", | ||
"category": "Account", | ||
"depends": ["analytic", "account_financial_report"], | ||
"maintainers": ["BernatObrador", "miquelalzanillas"], | ||
"data": [ | ||
"security/ir.model.access.csv", | ||
"wizard/trial_balance_analytic_wizard_view.xml", | ||
"menuitems.xml", | ||
"reports.xml", | ||
"report/templates/trial_balance_analytic.xml", | ||
"views/report_trial_balance_analytic.xml", | ||
"views/account_analytic_line.xml", | ||
], | ||
"assets": { | ||
"web.assets_backend": [ | ||
"account_analytic_report/static/src/js/*", | ||
], | ||
}, | ||
"application": False, | ||
"installable": True, | ||
"auto_install": False, | ||
"license": "AGPL-3", | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.