← Back to Pull requests

[18.0][FIX] account_financial_report: flatten nested css so pdf styles apply #1575

Closed
unknown closed this pull request without merging on Oct 02, 2026 13:39 UTC
View on GitHub
unknown unknown commented on Sep 21, 2026 07:16 UTC
Author

Describe the bug

Every report built on account_financial_report.internal_layout prints a PDF without cell borders, without bold column headers, without the row separators of list_table, without the grey background of the account titles, and with the amounts centered instead of right aligned. The HTML version of the same report shows all of them.

Affected reports: trial balance, general ledger, open items, aged partner balance, VAT report, journal ledger, and the downstreaml10n_it_financial_statements_report of OCA/l10n-italy.

Root cause

Commit 4b342565 ([FIX][18.0] account_financial_report: fix scss affect other places, 2025-07-24) moved static/src/scss/report.scss to static/src/css/report.css and removed the SCSS compilation. The file kept its
nested selectors, and report/templates/layouts.xml links it as a plain stylesheet:

<link href="/account_financial_report/static/src/css/report.css" rel="stylesheet" />

Browsers parse native CSS nesting since 2023, so the HTML report renders the nested rules. wkhtmltopdf 0.12.6 runs on QtWebKit, which has no nesting support and discards every nested block:

.data_table {
    .act_as_cell {
        border: 1px solid lightGrey;   /* never reaches the PDF */
    }
}

Steps to reproduce

1. Install account_financial_report on 18.0 or 19.0.
2. Run any financial report, for example Trial Balance.
3. Compare the HTML output with the PDF output.

The HTML shows bordered cells, bold headers and right aligned amounts. The PDF shows none of them.

Expected behavior

The PDF matches the HTML. Writing both stylesheets with flat selectors restores it, with the same declarations in the same order and no change in specificity. A PDF rendered from the flattened file is pixel identical to one rendered from the nested
file with the discarded rules appended.

Fix

Both files rewritten with flat selectors and a / / comment. Same declarations, same order, same specificity.

Fixes #1576

Diff: 255 lines (+191 / -64) across 3 files Reviewer: eduezerouali-tecnativa Review duration: 16223m
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.39) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 255 lines diff across 3 files
0.39
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.332
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #1575"
general weight: 0.35
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 39.1% (MEDIUM) · Higher = larger blast radius
39.1%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 15.4% · Safe to merge
15.4%