-
-
Notifications
You must be signed in to change notification settings - Fork 623
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_financial_report #1101
[17.0][MIG] account_financial_report #1101
Conversation
Some changes in the databases been made in OCA#403, but no migration is needed.
When this module is installed along with other chart account different from generic one, the number of expected accounts and the computation change (for example, in Spain, the unaffected earnings account is 129000, choking with group with code prefix 1). This commit makes the tests resistent to these changes.
To general ledger
When there are a lot of account.move.line (several millions) and print any of the Qweb reports, that will generate also a lot of transient objects. As these objects are created with an "insert" query, the cleaning normally triggered by the count of the records in transient tables is not done, so only the cleaning based on the age of the records is processed (by default, records older than 1 hours are deleted), but the cron task is only ran one time per day. For large setups this can lead to memory errors at that point. This change prevents the memory error by executing the transient record cleanup for the report models in this module in SQL.
Currently translated at 73.9% (215 of 291 strings) Translation: account-financial-reporting-11.0/account-financial-reporting-11.0-account_financial_report Translate-URL: https://translation.odoo-community.org/projects/account-financial-reporting-11-0/account-financial-reporting-11-0-account_financial_report/de/
Currently translated at 50.2% (146 of 291 strings) Translation: account-financial-reporting-11.0/account-financial-reporting-11.0-account_financial_report Translate-URL: https://translation.odoo-community.org/projects/account-financial-reporting-11-0/account-financial-reporting-11-0-account_financial_report/es/
Currently translated at 96.2% (178 of 185 strings) Translation: account-financial-reporting-11.0/account-financial-reporting-11.0-account_financial_report Translate-URL: https://translation.odoo-community.org/projects/account-financial-reporting-11-0/account-financial-reporting-11-0-account_financial_report/ar/
Currently translated at 100.0% (291 of 291 strings) Translation: account-financial-reporting-11.0/account-financial-reporting-11.0-account_financial_report Translate-URL: https://translation.odoo-community.org/projects/account-financial-reporting-11-0/account-financial-reporting-11-0-account_financial_report/es/
Currently translated at 83.5% (243 of 291 strings) Translation: account-financial-reporting-11.0/account-financial-reporting-11.0-account_financial_report Translate-URL: https://translation.odoo-community.org/projects/account-financial-reporting-11-0/account-financial-reporting-11-0-account_financial_report/nl/
Currently translated at 100.0% (291 of 291 strings) Translation: account-financial-reporting-11.0/account-financial-reporting-11.0-account_financial_report Translate-URL: https://translation.odoo-community.org/projects/account-financial-reporting-11-0/account-financial-reporting-11-0-account_financial_report/es/
Currently translated at 23.0% (67 of 291 strings) Translation: account-financial-reporting-11.0/account-financial-reporting-11.0-account_financial_report Translate-URL: https://translation.odoo-community.org/projects/account-financial-reporting-11-0/account-financial-reporting-11-0-account_financial_report/it/
- Adds 'Period balance' column - Renames the option 'Hide accounts at 0'. Means no initial, no debit, credit or ending balance for the period. - Fixes logic to remove lines with 0 activity for the period. - improve the calculation in the Trial Balance of undistributed profits/losses account, and provide a footer note to the user explaining why will the ending balances will not be zero, but the period's total profit and loss. - add an extra line for P&L application so that the trial balance zeroes in the balance, and total debits = total credits - refactoring of the unaffected earnings reporting in the general ledger and trial balance.
Currently translated at 74.6% (217 of 291 strings) Translation: account-financial-reporting-11.0/account-financial-reporting-11.0-account_financial_report Translate-URL: https://translation.odoo-community.org/projects/account-financial-reporting-11-0/account-financial-reporting-11-0-account_financial_report/de/
Currently translated at 96.4% (291 of 302 strings) Translation: account-financial-reporting-11.0/account-financial-reporting-11.0-account_financial_report Translate-URL: https://translation.odoo-community.org/projects/account-financial-reporting-11-0/account-financial-reporting-11-0-account_financial_report/es/
All reports: - Rename field to hide accounts at 0 to 'hide_account_at_0' Trial Balance: - Add possibility to filter by hierarchy levels - XLSX format will show the hierarchy levels in bold General Ledger: - Add the possibility to filter by analytic tags - Fixes an error on the default date Journal Ledger: - The filter on Journals is now optional. If the user does not choose a journal, by default it will display all journals. Aged Partner Balance: - Fixes an error on the default date
Currently translated at 39.7% (120 of 302 strings) Translation: account-financial-reporting-11.0/account-financial-reporting-11.0-account_financial_report Translate-URL: https://translation.odoo-community.org/projects/account-financial-reporting-11-0/account-financial-reporting-11-0-account_financial_report/ro/
* Fix account group level computation Depends was not correct for recomputing when needed + better algorithm * Make hide details on 0 work properly * Passing values to general ledger was stripping some correct records * Computed field for hiding lines doesn't have proper dependencies nor is not taking into account float currency accuracy
Currently translated at 21.5% (67 of 312 strings) Translation: account-financial-reporting-11.0/account-financial-reporting-11.0-account_financial_report Translate-URL: https://translation.odoo-community.org/projects/account-financial-reporting-11-0/account-financial-reporting-11-0-account_financial_report/it/
Currently translated at 99.7% (311 of 312 strings) Translation: account-financial-reporting-11.0/account-financial-reporting-11.0-account_financial_report Translate-URL: https://translation.odoo-community.org/projects/account-financial-reporting-11-0/account-financial-reporting-11-0-account_financial_report/es/
* Fix wizards for proper multicompany behaviour. * Fix layout issue
- minor usability fixes for multicompany - improve performance of general ledger using a new index
Please, cherry-pick #1117 |
Steps: - Accounting > Reporting > OCA accounting reports > Journal Ledger - Select Date range and activate Foreign Currency Get "{'name': 'EUR'} " in currency field Desired: get EUR
Please cherry-pick #1136 |
@norlinhenrik You're still working on it, right? Did you have the opportunity to check the last comments from Victor? THX. |
…eneral ledger In v15 it was filtered by the internal_type field (type of account.account.type) to use "other" (most of the accounts had it set). Now in v16, there is the account_type field exists and has to be compatible. The in or not in operator is set to "simplify" the domain and avoid having to set almost all types.
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.
Last commits have been added. I tested it in runboat and overall seems to be OK.
Functional review @victoralmau @pedrobaeza
/ocabot migration account_financial_report |
import {ReportAction} from "@web/webclient/actions/reports/report_action"; | ||
import {patch} from "web.utils"; | ||
import {useEnrichWithActionLinks} from "./report.esm"; | ||
// /** @odoo-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.
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.
patch(ReportAction.prototype, "account_financial_report.ReportAction", {
This line is causing error. How to do it in 17.0?
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.
patch(ReportAction.prototype, {
setup() {
this._super.apply(this, arguments);
TypeError: Cannot read properties of undefined (reading 'apply')
super.apply(...arguments);
TypeError: (intermediate value).apply is not a function
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.
// super.apply(arguments);
TypeError: Cannot read properties of undefined (reading 'el')
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.
super.setup(...arguments);
This worked
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.
@pedrobaeza Could you check if last changes solves pending issues? Thanks
d653fba
to
b6effa7
Compare
…_earnings_account
b6effa7
to
03a3a6f
Compare
53abd98
to
9f60cdf
Compare
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.
Working, thanks!
/ocabot merge nobump
This PR looks fantastic, let's merge it! |
Congratulations, your PR was merged at 8361090. Thanks a lot for contributing to OCA. ❤️ |
|
||
|
||
class AbstractWizard(models.AbstractModel): | ||
_name = "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.
The module name is giving errors when upgrading Odoo!
def validate_model(model):
if "" in model and "." not in model and not model.startswith("x_") and model not in _VALID_MODELS:
raise SleepyDeveloperError("{}
seems to be a table name instead of model name".format(model))
return model
This one blocks the upgrade of Odoo to version v17.
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.
Has someone else already ran into this problem?
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.
That error is on migration scripts or Odoo code?
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.
This error blocks the upgrade when using CLI command
python <(curl -s https://upgrade.odoo.com/upgrade) test -d <your db name> -t <target version>
We are facing this problem on different projects.
The answer of Odoo is that the module has an incorrect name and we should change it.
The v17 version of the module is not giving an error when installing it on a Vanilla Odoo instance.
I don't know why they are throwing this error...
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.
Feel free to make a PR with _name = "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.
Feel free to make a PR with
_name = "account.financial.report.abstract.wizard"
Or
_name = "report.account_financial_report.abstract_wizard"
same that:
_name = "report.account_financial_report.vat_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.
Yes _name = "report.account_financial_report.abstract_wizard"
is even better.
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.
But this is not going to help of course the migration from v14 :-)
Then it needs to be changed there also.
I logged a ticket at Odoo to exclude the abstract classes from this check...because it's not going to create a model at all.
The module works in a vanilla Odoo v17, so it's an upgrade issue.
The original name existing with only underscores is giving errors when upgrading to v17. This change has been discussed in OCA#1101
report_action.esm.js
caused problems so I disabled the code, since I don't know how to fix it. Anyway, the reports seem to work fine.