[19.0][IMP] web_tree_many2one_clickable: support document lines #3739
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 301 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.342
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #3739"
general
weight: 0.35
CarlosRoca13
The clickable button does not show in the lines of invoices, sales and purchases, which the ROADMAP said needed a glue module.
Those lists use
account.SectionAndNoteListRenderer.RecordRow(andsale.ListRenderer.RecordRowon top of it), a primary template inheritingweb.ListRenderer.RecordRow. In 19.0 a primary template only inherits the extensions of its parent that were loaded before it, and this module's extension loads afteraccount's templates.This PR loads the template extension right after
web/static/src/views/list/list_renderer.xml, the same approach as #3148 on 16.0. Every list renderer with its own primary record row template now gets the button, with no dependency onaccountand no glue module. The ROADMAP note about the glue module is removed. Fields displayed with a widget (like the product field) still don't get the button, as before.This is in production use at one of our clients on 19.0.
How to test
On runboat (or any 19.0 database with
account):1. With debug mode on, add an inherited view of
account.view_move_formthat shows the line partner column, which is already in the list but hidden:2. Open an invoice and hover the Partner column of the lines: the button shows and opens the partner. Without this change, no button shows.
3. Keep the Product column of the lines hidden: on runboat it currently crashes because of web_widget_product_label_section_and_note_full_label (#3707), unrelated to this PR. If you can't open the invoice form view at all, reset your localStorage.
With sale installed, the same works on order lines, e.g. by adding <field name="order_partner_id" optional="show"/> after product_uom_qty in sale.view_order_form. Purchase lines behave the same way.
Tested on a clean 19.0 database with
sale, in a headless browser:| List | Before | After |
|---|---|---|
| Invoice lines,
partner_id| no button | 1 button, opens the partner || Sale order lines,
order_partner_id| no button | 1 button, opens the partner || Contacts list,
country_id| button | button (unchanged) |There is an open 20.0 migration of this module (#3693); this change can be carried forward there once merged.