[19.0][MIG] l10n_us_mis_financial_report: Migration to 19.0#180
Draft
dnplkndll wants to merge 19 commits into
Draft
[19.0][MIG] l10n_us_mis_financial_report: Migration to 19.0#180dnplkndll wants to merge 19 commits into
dnplkndll wants to merge 19 commits into
Conversation
Currently translated at 100.0% (32 of 32 strings) Translation: l10n-usa-17.0/l10n-usa-17.0-l10n_us_mis_financial_report Translate-URL: https://translation.odoo-community.org/projects/l10n-usa-17-0/l10n-usa-17-0-l10n_us_mis_financial_report/es/
6b39941 to
34a5275
Compare
34a5275 to
2a17b84
Compare
- demo/demo.xml: 11 USDMO-prefixed accounts + 3 posted journal entries covering all US GAAP differentiators (expense_direct_cost/COGS, income_other/interest, expense_depreciation, asset_fixed, liability_non_current). Entries are self-contained and CoA-agnostic (use USDMO codes). - tests/test_mis_report_us.py: TransactionCase with setUpClass fixtures identical to the demo scenario. Covers: - structure: 9 P&L KPIs present, 24 BS KPIs present - gross_profit = op_inc − cost_of_reven = 4 000 - net_profit = 1 500 - other_inc = 500, depreciation = 1 000 (distinct expense lines) - BS fixed_assets = 19 000, non_current_liabilities = 15 000
mis_builder.compute() returns body rows with keys label / description /
style / cells — there is no row_id. KpiMatrixRow.label returns
kpi.description (display string), and two of this report's P&L KPIs
have the same description ('Expenses' for kpi_expenses and
kpi_expenses_total). Auto_expand_accounts also adds detail rows under
each parent, so sequence-based indexing into body is unreliable.
New helper _kpi_value(report_xmlid, kpi_name) walks body in matrix order
and selects the Nth row whose label equals the target KPI's description,
where N counts earlier KPIs (by sequence) that share the same
description. This gives unambiguous lookups by technical kpi name.
Fixes CI:
KeyError: 'row_id'
on TestMisReportUs.test_gross_profit / test_net_profit / test_other_income
/ test_depreciation / test_bs_fixed_assets_and_noncurrent_liabilities.
2007db5 to
53c78ab
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Migration of l10n_us_mis_financial_report to Odoo 19.0.