← Back to Pull requests

[18.0][FIX] hr_appraisal_oca: read public employee profiles #1670

Open
parabol123654 opened this pull request with 13 lines diff across 2 files
View on GitHub
parabol123654 parabol123654 commented on Nov 12, 2026 17:21 UTC
Author

Fixes #1669.

can_open_last_appraisal is defined on hr.employee.base, so it is also computed for hr.employee.public. Its compute reads employee.sudo().allowed_user_ids, which only exists on hr.employee. Reading the public profiles with all their fields therefore raises:

AttributeError: 'hr.employee.public' object has no attribute 'allowed_user_ids'

The fix reads the allowed users on the hr.employee record of the same id (public profiles share the ids of the employees), as superuser, like the compute already did since #1662.

Test: test_read_public_employees reads the public profiles with all fields as an internal user.

  • Without the fix: the AttributeError above.

  • With the fix: the profiles are read. The module tests pass (10).
  • Assisted-by: Claude Opus 5.5

    Diff: 13 lines (+11 / -2) across 2 files Reviewer: pedrobaeza Review duration: 9948m
    All Vouch review confidence checks passed
    Residual risk 0.08 = Change Risk (0.25) × (1 − Review Confidence (0.70)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.25 · 13 lines diff across 2 files
    0.25
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.54 · 1 substantive comment(s)
    0.54
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    70%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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.158
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    3 items
    OCA-git-bot OCA-git-bot commented on Nov 12, 2026 17:21 UTC
    Bot

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

    pedrobaeza pedrobaeza approved these changes on Nov 12, 2026 18:40 UTC
    Approved Reviewer

    Approved these changes.

    Reviewers
    Assignees
    parabol123654 parabol123654
    Labels
    risk: low confidence: 70.1% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 25.2% (LOW) · Higher = larger blast radius
    25.2%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 70.1% · Lower = rushed or shallow review
    70.1%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 7.5% · Safe to merge
    7.5%
    Repository