Hello, is there a way to set it so a manager is notified when someone cancels PTO that has been approved already?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project
- MRP
This question has been flagged
Hello James Hinton,
I hope you are doing well.
Here, you can find an example of automated action to notify the person responsible / manager for the employee cancels Paid Time Off Leave.
Find Example in the comment.
I hope this can help you.
Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari
For Example -
Note - Check Indentation of the code after pasting the code.
Change the f String as per your requirement.
- Create an automated action by adding
name, model( Time Off (hr.leave) as per your requirement),
trigger(update as per your requirement), Trigger fields (Active (hr.leave), Before Update Domain( Active is set ), Apply on ( Active is not set ) as per your requirement), Action To Do ( Execute Python Code ).
- In the Python Code Below Paste this code:-
for leave in records:
if leave.holiday_status_id.name == 'Paid Time Off' and leave.employee_id.parent_id:
leave.employee_id.parent_id.message_post(message_type="notification", body=f"Notification: {leave.employee_id.name} has canceled the PTO Leave")
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up