Skip to content

[16.0][FIX] document_page_reference: migrate widget to OWL#622

Open
dnplkndll wants to merge 1 commit into
OCA:16.0from
ledoent:16.0-fix-document_page_reference-owl
Open

[16.0][FIX] document_page_reference: migrate widget to OWL#622
dnplkndll wants to merge 1 commit into
OCA:16.0from
ledoent:16.0-fix-document_page_reference-owl

Conversation

@dnplkndll

@dnplkndll dnplkndll commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Supersedes #601 (rebased on current 16.0). Original work by @IJOL.

The legacy web.field_registry widget isn't picked up by the OWL form parser, so content_parsed renders raw ${reference} text instead of clickable links. This migrates the widget to OWL (registry.category("fields") + HtmlField), replaces the oe_read_only/oe_edit_only CSS toggle (dead in OWL forms) with readonly="1"/invisible, strips the target="_blank" that retargetLinks adds to internal links, and fixes a Markup escaping case in _get_page_index.

content_parsed is set sanitize=False so the rendered oe_direct_line anchors (data-oe-model/data-oe-id) the widget binds to survive — html_sanitize strips those attributes. This is safe: the source content field is still sanitized and page names are html_escaped in _get_page_index, so no unsanitized user input reaches this field.

@OCA-git-bot

Copy link
Copy Markdown
Contributor

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

content_parsed is sanitize=False so the rendered oe_direct_line anchors
the widget binds to survive (html_sanitize strips the data-oe-* attrs);
the source content is still sanitized and page names are html_escape'd.
@dnplkndll dnplkndll force-pushed the 16.0-fix-document_page_reference-owl branch from 52287c1 to fee7446 Compare June 20, 2026 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:document_page_reference Module document_page_reference series:16.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants