Skip to content

[16.0][IMP] agx_approval: partner/employee smart buttons to approval requests - #1237

Open
n3n wants to merge 1 commit into
16.0from
16.0-imp-agx_approval-partner-employee-smart-buttons
Open

[16.0][IMP] agx_approval: partner/employee smart buttons to approval requests#1237
n3n wants to merge 1 commit into
16.0from
16.0-imp-agx_approval-partner-employee-smart-buttons

Conversation

@n3n

@n3n n3n commented Aug 31, 2026

Copy link
Copy Markdown
Member

Summary

  • Add a smart button on res.partner forms that counts and opens approval.request records where the contact appears in participant_ids.
  • Add a smart button on hr.employee forms that counts and opens approval.request records where the employee is owner_id or appears via work_contact_id in participant_ids (deduplicated).
  • Counts are computed with sudo() for accurate badges; clicking opens the list/form under the user's own permissions (record rules still apply).

Test plan

  • -u agx_approval and open a contact/employee that appears in an approval request; confirm the badge count and that clicking opens the filtered list (or single form when count is 1).
  • Confirm the button is hidden entirely (not just zero) for partners/employees with no related requests.
  • Confirm an employee who is both owner_id and a participant on their own request is not double-counted.
  • Confirm the button is gated by agx_approval.group_approval_own (hidden for users without any approval group).

… requests

Add back-link smart buttons on res.partner and hr.employee forms that
count and open the approval.request records where the contact/employee
appears (participant_ids or owner_id), closing the loop that previously
only went from request to person.
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.

1 participant