Hey Emilio!
It's me, ERDF, from planet OXP-10.02-04-2024,
We faced this situation one year ago and... I have great news for you! With sufficient creativity, this can be achieved!
Here the Out of the box solution that we implemented:
Step 1: Customize the Attendance Form.
Add a status bar through Studio:

Now, to add the restriction that only supervisors can see the status bar, include a limit on visibility to groups.

Then, if you want to know who approved the attendance record, you can set the field as tracked. Just activate developer mode > click on the little bug
> View fields > search the status bar and then on the field "Enable Ordered Tracking" input 1. (This will log every modification of this field in the chatter)

Ok, we can say if one attendance record is approved or not and the supervisor or administrators can modify the attendance status. Now, we will need to customize a little bit of payroll, but before that, let me explain to you what we will do.
We must alert Odoo that the payroll officer cannot generate payslips using work entries linked to attendance records that remain unapproved. But why? and how?
Reasons why could be:
- Payment accuracy
- Regulatory compliance
- Improved oversight
- Fraud reduction
- Streamline payroll process
- Transparency
To achieve this, we first need to link the approvals with work entries. Remember, work entries can be generated automatically from attendance records, planning, or work schedules, and these work entries are closely tied to those types of records.
Step 2: Work Entries Customization
Go to Payroll > Work Entries > Access to Studio > Form view > add a related field.

Once this is done, let's start automating!
Step 3: We will generate an automated action in the work entries where if the attendance status field is not approved and the work entry source is Attendances, Odoo will establish that the work entry is in conflict. (Conflict status in Odoo means that payroll users won't be able to generate payslips from those work entries).


Step 4: Now, whenever the attendance record gets approved, Odoo should change the status from conflict to draft so that payroll users can generate and process payslips.


Please let me know if this works for you, and remember the solution could apply right, depending on your case.