Repository navigation
[19.0][FIX] report_async: only offer the report templates of the document - #1227
Open
parabol123654 wants to merge 1 commit into
Open
parabol123654 wants to merge 1 commit into
parabol123654 wants to merge 1 commit into
Conversation
Contributor
|
Hi @kittiu, |
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
force-pushed
the
19.0-fix-report_async-report-domain
branch
from
November 14, 2026 18:13
a5a85f4 to
d39d82d
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.
Bug. In the "Print Document" wizard,
_onchange_referencerestricts "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_modelis used in the view domain ofaction_report_id. The onchange only resets the template when the document changes.Test.
test_report_templates_of_the_documentevaluates 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