[18.0][IMP] document_page_reference: split linking feature into document_page_reference_link#631
Open
miquelrosell99 wants to merge 2 commits into
Open
Conversation
…reference_link
Keep only the reference field (validation, uniqueness, auto-generation
and views) in this module, so deployments that want the field without
the {{reference}} linking feature (or with their own linking approach)
can use it standalone.
The linking feature (content_parsed, marker resolution, report override
and editor JS) moves to the new document_page_reference_link module.
Install it to keep the previous behavior; content_parsed is recreated
and recomputed automatically on install.
New module with the linking feature moved out of
document_page_reference: content_parsed, {{reference}} marker
resolution into direct links, report override and backend editor JS.
Code moved as-is, no behavior changes.
Contributor
|
Hi @etobella, |
Member
|
@miquelrosell99 I understand your need, however, the changes required to add the link are minimal and doesn't affect to first module, so it has sense to use them together, at the end, the user can decide not to make links, isn't it? |
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.
Motivation
document_page_referencecurrently bundles two independent concerns:referencefield ondocument.page(validation, uniqueness, auto-generation from the name, views);content_parsed,{{reference}}marker resolution into direct links, the report override, and the backend editor JS.Some deployments want the field without the linking feature — either because they don't need it, or because they prefer a different linking implementation. Today that is not possible without uninstalling the whole module.
Changes
document_page_reference(18.0.3.0.0): keeps thereferencefield, its validation/auto-generation, and the form/search/list views. All linking code is removed.document_page_reference_link(new): contains everything that was moved out —content_parsed,{{ref}}resolution, report override, editor JS — with no behavior changes. Depends ondocument_page_reference.All moved code (model methods, views, JS, tests) is byte-identical to the original; the diff is a pure code motion split.
Upgrade path
document_page_referencealone removes the linking feature (the storedcontent_parsedcolumn is dropped). To keep current behavior, installdocument_page_reference_link— the column is recreated and recomputed automatically on install.referencefield itself is unaffected (same model, same name): no data migration needed.Notes
document_page_referenceor its view XML IDs, so the split is safe repo-internally.