def check_if_final(self): if self.final_notification_triggered or self.final_notification_sent: return if self.all_signatures_in(): background_action(self.attr_name('background_final_notification')) prevent_going_back() self.final_notification_triggered = True
def out_for_signature(self): if self.initial_notification_triggered or self.initial_notification_sent: return self.rationalize() for code, info in self.info_by_code.items(): if not info['signed']: send_email(to=info['signer'], template=self.initial_notification_email[code], dry_run=True) send_email(to=info['signer'], template=self.final_notification_email[code], dry_run=True) for person in self.additional_people_to_notify: send_email(to=person, template=self.final_notification_email_to_others, dry_run=True) background_action(self.attr_name('background_initial_notification')) self.initial_notification_triggered = True