Repository navigation
[18.0][FIX] document_page: show styled diff in the Difference wizard - #651
Open
miquelrosell99 wants to merge 1 commit into
Open
miquelrosell99 wants to merge 1 commit into
miquelrosell99 wants to merge 1 commit into
Conversation
The "Difference" wizard (wizard.document.page.history.show_diff) renders the computed diff HTML, which marks changes with custom <added>/<removed> tags. The only stylesheet for those tags (document_page.scss) scopes them under the .o_document_page_diff class, which the wizard view never sets, so the diff rendered as unstyled plain text and no differences were visible to the user. Set the class on the wizard's diff field so the wizard highlights the added/removed content, like the history form's Changes tab does. Also replace the invalid class="overflow-x: scroll" (class names cannot contain spaces or colons) with the overflow-auto utility.
CristianoMafraJunior
approved these changes
Oct 7, 2026
BhaveshHeliconia
approved these changes
Oct 9, 2026
Contributor
|
This PR has the |
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.
Steps to reproduce (runbot or local, document_page only)
Current behavior
The wizard dialog shows the version text as unstyled plain text — no added/removed highlighting is visible at all.
The computed diff HTML marks changes with custom
<added>/<removed>tags. The only stylesheet for those tags isdocument_page/static/src/scss/document_page.scss, which scopes them under the.o_document_page_diffclass. The wizard form view (view_wiki_show_diff) never sets that class (the history form's Changes tab does), so the tags render as plain inline text and the differences are invisible.The view also carried an invalid
class="overflow-x: scroll"— class names cannot contain spaces or colons, so it applied no styles at all.Desired behavior
The wizard highlights added content (green) and removed content (red strikethrough), like the history form's Changes tab.
Fix
Set
class="o_document_page_diff overflow-auto"on the wizard'sdifffield.Prepared with assistance from an AI coding agent (Kimi Code).