Skip to content

[19.0][FIX] report_async: only offer the report templates of the document - #1227

Open
parabol123654 wants to merge 1 commit into
OCA:19.0from
parabol123654:19.0-fix-report_async-report-domain
Open

parabol123654 wants to merge 1 commit into
OCA:19.0from
parabol123654:19.0-fix-report_async-report-domain

Conversation

@parabol123654

@parabol123654 parabol123654 commented Oct 31, 2026 •

Copy link
Copy Markdown

Bug. In the "Print Document" wizard, _onchange_reference restricts "Report Template" by returning {"domain": {"action_report_id": ...}}. The web client has ignored onchange domains since 17.0, and the field has no domain in the model or the view. So any report of any model can be picked for the chosen document. Rendering then fails, or prints a report of another model with the document's ids.

Fix. A port of #1050 (17.0) by @xaviedoanhduy, which the stale bot closed without a review. A computed reference_model is used in the view domain of action_report_id. The onchange only resets the template when the document changes.

Test. test_report_templates_of_the_document evaluates the domain of the field in the wizard view for a document and checks that only that model's reports are offered. It fails without the fix and passes with it (3/3).

18.0 doesn't have report_async. #1192 and #1189 don't touch the wizard.

Assisted-by: Claude Opus 5.5

@OCA-git-bot

Copy link
Copy Markdown
Contributor

Hi @kittiu,
some modules you are maintaining are being modified, check this out!

The domain of the report template was returned by an onchange, which
the web client ignores since 17.0, so the "Print Document" wizard
offered the reports of every model for any document.

Port of OCA#1050 (17.0) by xaviedoanhduy.

Assisted-by: Claude Opus 5.5
@parabol123654
parabol123654 force-pushed the 19.0-fix-report_async-report-domain branch from a5a85f4 to d39d82d Compare November 14, 2026 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants