[18.0][FIX] printer_zpl2: do not require access on ir.model #496
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.35) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.35 · 169 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 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
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.307
Real PR Conversation Timeline
1 comments
"Review active on #496"
general
weight: 0.35
MiquelRForgeFlow
Port of #353 (16.0) to 18.0, extended to the print label wizard.
Problem: since 17.0, only Access Rights administrators (
base.group_erp_manager) can readir.model. Every internal user is a Print User (base.group_userimpliesprinting_group_user), but printing a ZPL2 label as an internal user who is not an administrator fails within three places:
default_getsearches labels onmodel_id.model, so the wizard can't even open;label_idfield uses the samemodel_id.modelpath, so the label dropdown fails too;printing.label.zpl2.print_labelreadslabel.model_id.model(the part fixed in 16.0 by #353).Fix:
print_label: read the model withsudo(), as in #353.model_idwithir.model._get_id(active_model), which doesn't need access toir.model.Test:
test_print_record_label_internal_usergoes through the wizard as an internal user: the label domain, the wizard creation (default values) and the printing (cups patched). Without the fix it fails with theAccessErrorabove (domain search); with only the wizard part it still fails inprint_label. With the fix, all the module's tests pass (48 tests on Odoo 18.0).Assisted-by: Claude Opus 5.5