Skip to content

[14.0][FIX] account_invoice_report_service_repair: permission error on non …#718

Merged
eantones merged 1 commit into14.0from
14.0-fix-account_invoice_report_service_repair-no_repair_user_permission_error
Sep 22, 2025
Merged

[14.0][FIX] account_invoice_report_service_repair: permission error on non …#718
eantones merged 1 commit into14.0from
14.0-fix-account_invoice_report_service_repair-no_repair_user_permission_error

Conversation

@eantones
Copy link
Copy Markdown
Member

…repair user access

Copilot AI review requested due to automatic review settings September 22, 2025 16:02
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes permission errors for non-repair users when accessing repair order information by adding sudo access to related fields and model lookups.

Key Changes

  • Added compute_sudo=True to the date_order field in repair orders to allow access to related move date without repair permissions
  • Modified the _get_orders method to use sudo() when accessing repair-related fields to prevent permission errors

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
account_invoice_report_service_repair/models/repair_order.py Added compute_sudo=True to date_order field to allow non-repair users to access the related move date
account_invoice_report_service_repair/models/account_move_line.py Added sudo() calls when accessing repair_fee_ids and repair_line_ids to prevent permission errors

Comment thread account_invoice_report_service_repair/models/account_move_line.py
@eantones eantones force-pushed the 14.0-fix-account_invoice_report_service_repair-no_repair_user_permission_error branch from 547299b to b71fdaa Compare September 22, 2025 16:04
@eantones eantones merged commit 96496e7 into 14.0 Sep 22, 2025
9 checks passed
@eantones eantones deleted the 14.0-fix-account_invoice_report_service_repair-no_repair_user_permission_error branch September 22, 2025 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants