[18.0][FIX] account_financial_report: flatten nested css so pdf styles apply #1575
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
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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
eduezerouali-tecnativa
Describe the bug
Every report built on
account_financial_report.internal_layoutprints a PDF without cell borders, without bold column headers, without the row separators oflist_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 downstream
l10n_it_financial_statements_reportof 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.scsstostatic/src/css/report.cssand removed the SCSS compilation. The file kept itsnested selectors, and
report/templates/layouts.xmllinks it as a plain 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:
Steps to reproduce
1. Install
account_financial_reporton 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