Hello,
I created a Server Action (Settings->Technical->Actions->Server Actions) and then created a button for this Server Action in the sale.order model. The functionality of the button is to create a Planned Activities when it is confirmed as Backorder.
I want to call the "action_schedule_activities" function of the "Schedule" button in the "mail.activity.schedule" model. Since it was added in the "mail.mail_activity_schedule_view_form" form. When I try to implement it, I get the error:
NameError: name 'self' is not defined
Below is my code in the Server Action:
if records(self):
action = self.env['mail.activity.schedule'].action_schedule_activities()
I appreciate any answers, thank you!